码迷,mamicode.com
首页 > 其他好文 > 详细

in-house BEM code

时间:2020-06-04 21:36:34      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:abs   pen   hit   class   must   containe   style   otp   not   

BEM compiling

1 Compiling

 

1.1 steady bem code

>>>

f95 -oa bemhat.f 
./a


>>>

1.2 unsteady BEM

requirement: fortran compiler ( g95 (Fortran 95, free), ifort (not free) is need to compile the source code.

1. compiling source code
To compile the source code using ifort compiler and TUDK model:
~f95 wake_tudk.f dyn_aero.f~  
To compile using ifort compiler and GH  model:
~f95 wake_gh.f dyn_aero.f~  
2. running object code
after compilation, an object code named "a.out" is generated.
To run the object code:
~./a.out~    # "./ " means current directory 
~./~        #current directory
~../~  # parent directory
3. analysing output files
two output files are generated, i.e. *blade_aero1.plt* and  *coeff_time.plt*
4. plot *Cp(Ct) vs time* using *gnuplot*
~gnuplot~    #open gnuplot 
~load "coeff_tim.gnu~   #load gnuplot file

In order to compile, one has to use a Fortran compiler as g95, ifort and so on. For example if one wants to use the TUDK model and the ifort compiler, one should compile at the prompt:

ifort wake_tudk.f dyn_aero.f.

If the GH model is to be used, then

ifort wake_gh.f dyn_aero.f

The file incl.for must be in the same folder where the compiling takes place.

1.3 surfacebem code:

f95 -O3 wake_surf.f dyn_surf.f

./a.out   # ~./~ means current folder

#gnuplot plotting

>>> load ‘c_t.gnu‘

>>> load ‘blade_aero.gnu‘

Author: ka

Created: 2020-06-04 四 21:04

Emacs 24.5.1 (Org mode 8.2.10)

Validate

in-house BEM code

标签:abs   pen   hit   class   must   containe   style   otp   not   

原文地址:https://www.cnblogs.com/code-saturne/p/13046528.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!