diff --git a/WKDIR/labARstraight_toolInput.xml b/WKDIR/labARstraight_toolInput.xml
new file mode 100644
index 000000000..83fae1cfe
--- /dev/null
+++ b/WKDIR/labARstraight_toolInput.xml
@@ -0,0 +1,1004 @@
+
+
+ +
+ +Example picture. Image in the public domain, from [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Spirit_of_St._Louis.jpg) + +## Inputs + +ModuleTemplate needs no inputs. + +## Analyses + +ModuleTemplate computes nothing. + +## Outputs + +ModuleTemplate outputs nothing. + +## Installation or requirements + +ModuleTemplate is a native CEASIOMpy module, hence it is available and installed by default. + +## Limitations + +ModuleTemplate is limited in every aspect. + +## More information + +*=+ CSTM*(q-) +* DEFAULT = 0.01 +* +CSTM,R ,1,1,0 +0.01 +* +*************************************************************************** +* Feed-back stabilization coefficient +* dq/dt + (1-C)*R(q) = 0, where C=CSTS if R(q)*(q-)<0 else C=0 +* DEFAULT = 0.01 +* +CSTS,R ,1,1,0 +0.01 +* +*************************************************************************** +* * +* ---------------- Implicit residual smoothing ---------------- * +* * +*************************************************************************** +* Residual smoothing parameter, CFL/CFL* >1 if used +* *DEFAULT = 1.3 +* +RSMPAR,R ,1,1,0 +1.3 +* +*************************************************************************** +* 0 = Standard residual smoothing +* 1 = Distance weighted residual smoothing +* +IRESMO,I ,1,1,0 +1 +* +*************************************************************************** +* >=1 : Number of Jacobi implicit residual smoothing sweeps +* +NSMCYC,I ,1,1,0 +2 +* +*************************************************************************** +* * +* ---------------- Time accurate options ---------------- * +* * +*************************************************************************** +* 0 = Ordinary with explicit or implicit time marching +* 1 = Implicit time accurate acc. to Jameson/Arnone +* 2 = Explicit time accurate with global time step +* +ITIMAQ,I ,1,1,0 +0 +* +*************************************************************************** +* 0 = Compute global time step +* 1 = Set global time step (DELTAT) when ITIMAQ = 2 +* +ISGLTS,I ,1,1,0 +0 +* +*************************************************************************** +* Implicit (ITIMAQ = 1) or +* Explicit (ITIMAQ = 2) global time step +* +DELTAT,R ,1,1,0 +0.005 +* +*************************************************************************** +* Convergence criteria, stop when MAX(LOG(RES)) < RESTAQ +* +RESTAQ,R ,1,1,0 +1.0 +* +*************************************************************************** +* Maximum number of inner iterations when implicit time accurate +* +ITMXAQ,I ,1,1,0 +100 +* +*************************************************************************** +* Minimum number of inner iterations when implicit time accurate +* +ITMNAQ,I ,1,1,0 +3 +* +*************************************************************************** +* Three constant for the unknowns, default backward difference +* BETNP1*U^n+1 + BETN*U^n + BETNM1*U^n-1 +* +BETNP1,R ,1,1,0 +1.5 +* +BETN,R ,1,1,0 +-2.0 +* +BETNM1,R ,1,1,0 +0.5 +* +*************************************************************************** +* Two constant for the residuals +* GAMNP1*R^n+1 + GAMN*R^n +* +GAMNP1,R ,1,1,0 +1.0 +* +GAMN,R ,1,1,0 +0.0 +* +*************************************************************************** +* Extrapolation scheme for startguess for each global timestep +* 0 = *DEFAULT = No extrapolation +* 1 = Linear extrapolation +* 2 = Quadratic extrapolation +* +EXTPOLTA,I ,1,1,0 +0 +* +*************************************************************************** +* 0 = Switch off time-averaging +* 1 = Set for time-averaging for steady or unsteady calculations +* Ouputs primitive variables and mean of velocity squares +* plus pressure square. Intended for LES type calculations +* 2 = Time averaging but only output of primitive variables +* Restart will read in old mean flow file +* +ITMEAN,I ,1,1,0 +0 +* +*************************************************************************** +* Time step at which time-averaging starts, function only if ITMEAN>0 +* NOTE: If INPRES=2 and ITMEAN=1, indicates that time-averaging +* restarts from a previous run. In this case, ITERM < ITER. +* +ITERM,I ,1,1,0 +2000 +* +*************************************************************************** +* Sample the mean solution to multiple (_it.bout) files every ITMULOU +* iterations +* +ITMULOU,I ,1,1,0 +0 +* +*************************************************************************** +* Specification of NPTHIS points where time-series is recorded for +* unsteady computations. Points input data file under CFIPOINTS +* +NPTHIS,I ,1,1,0 +0 +* +*************************************************************************** +* * +* ---------- Computing in a rotating frame of reference ---------- * +* * +*************************************************************************** +* 0 = No rotation +* 1 = Rotation +* +IROT,I ,1,1,0 +0 +* +*************************************************************************** +* Angular velocity and direction when rotation +* The absolute value is the angular velocity +* +OMGROT,R ,1,3,0 +0.0 0.0 0.0 +* +*************************************************************************** +* Coordinates for one point on axis off rotation +* +OMGCOO,R ,1,3,0 +0.0 0.0 0.0 +* +*************************************************************************** +* * +* ---------------- Maneuver option ---------------- * +* * +MANEUVERS,N ,0,0,6 +* +*************************************************************************** +* Maneuver solution options : +* 0 = No maneuver +* 1,2,3 = Prescribed motion through MOVDAT +* 202 = Coupled to external solver (full model) +* +ISOOPT,I ,1,1,0 +0 +* +*************************************************************************** +* Coordinates for body reference point +* +CMGCOO,R ,1,3,0 +0.0 0.0 0.0 +* +*************************************************************************** +* Input data format for the maneuver data given in MOVDAT +* 0 = Time, v1, v2, v3, w1, w2, w3 +* 1 = Time, v1, v2, v3, w1, w2, w3, W1, W2, W3 +* 2 = Time, v1, v2, v3, w1, w2, w3, O11, O12, O13, O21.... O33 +* +MOVDAT,R ,2,10,0 +0.0 0.0 0.0 0.0 0.0 0.0 125.664 0.0 0.0 0.0 +1.0 0.0 0.0 0.0 0.0 0.0 125.664 0.0 0.0 125.664 +* +*************************************************************************** +* Controls where in the inner, ITIN, loop the maneuver functions +* are active : +* 0 = Never +* N>0 = Every N inner iterations (ignored for ISOOPT= 0, 1, 2, 3) +* +NITIN,I ,1,1,0 +1 +* +*************************************************************************** +* File CFIPRM (inp) is the update/comunication file for MANEUVERS +* - required to modify internal parameters and data +* +CFIPRM,L ,1,1,0 +'Edge_mv.ainp ' +* +*************************************************************************** +* Controls IO format for external coupled solution +* 0 = use same file +* 1 = append _in and _out to filename +* +IPRM,I ,1,1,0 +0 +* +*************************************************************************** +* * +* ---------------- On-line mesh-deformation ---------------- * +* * +MSHD_CONSTANTS,N ,0,0,11 +* +*************************************************************************** +* Mesh deformation method +* 1 = Laplacian smoothing, diagonal preconditioner +* 2 = Spring analogy, diagonal preconditioner +* 3 = Radial basis functions (RBF) +* 4 = Translation/rotation/scaling (TRS) +* +METHOD,I ,1,1,0 +1 +* +*************************************************************************** +* Convergence tolerance : dimensionless +* +RELTOL,R ,1,1,0 +1.0E-6 +* +*************************************************************************** +* Convergence tolerance : length +* +ABSTOL,R ,1,1,0 +0.0 +* +*************************************************************************** +* Iteration limiter +* +MAXIT,I ,1,1,0 +1000 +* +*************************************************************************** +* Exponent for Laplace edge length denominator +* +DEXP,R ,1,1,0 +2.0 +* +*************************************************************************** +* Exponent for spring analogy stiffness definition +* +BETA,R ,1,1,0 +1.0 +* +*************************************************************************** +* RBF function: 1(Gaussian), 2(IQ), 3(IMQ), 4(Wennland), 5(3rd poly.) +* +RBF_OPT,I ,1,1,0 +1 +* +*************************************************************************** +* RBF shape factor. Default 0.8 +* +RBF_SF_REL,R ,1,1,0 +0.8 +* +*************************************************************************** +* TRS inboard distance to start deformation decay. Estimated if <0 +* +TRS_DIST_IN,R ,1,1,0 +-1.0 +* +*************************************************************************** +* TRS outboard distance to end deformation decay. Estimated if <0 +* +TRS_DIST_OUT,R ,1,1,0 +-1.0 +* +*************************************************************************** +* TRS damping to damp out scaling/rotation. 0-not damped, 1-all damped +* +TRS_DAMP,R ,1,1,0 +0.0 +* +*************************************************************************** +* * +* ---------------- Aeroelastics and related options ---------------- * +* * +*************************************************************************** +* Diagnostic dry run option for coupled / aeroelastic solutions +* 0 = Standard solution +* 1 = Flow-solver switched off +* +ISDRY,I ,1,1,0 +0 +* +AEROELASTICS,N ,0,0,14 +* +*************************************************************************** +* Aeroelastic solution options : +* 0 = Rigid grids (no aeroelastics) +* 100 = Modal fixed rigid +* 101 = Modal prescribed motion +* 102 = Modal coupled : orthogonal modes central difference +* 112 = Modal externally coupled +* 202 = Coupled to external solver (full model) +* +ISOOPT,I ,1,1,0 +0 +* +*************************************************************************** +* Mode type options : +* 0 = None, non-modal solutions PLACEHOLDER +* 1 = Volume grid perturbation +* 2 = Grid boundary surface - on-line mesh deformation +* 3 = Structural nodes PLACEHOLDER +* +MODOPT,I ,1,1,0 +0 +* +*************************************************************************** +* External force input on/off (coupled solutions only) : +* 0 = No external forces +* 1 = Input from CFIMOT (mot) file (ignored for ISOOPT= 0, 100, 101, 112) +* +IFORCED,I ,1,1,0 +0 +* +*************************************************************************** +* Controls where in the inner, ITIN, loop the AE functions are active : +* 0 = Never +* N>0 = Every N inner iterations (ignored for ISOOPT= 0, 100, 101) +* +NITIN,I ,1,1,0 +1 +* +*************************************************************************** +* Optional : subtract initial modal force (INPRES==2 only) +* 0 = No force offset at all +* 1 = Force offset from last point in res time history +* >1 = Force offset from specified time-point in "res" history +* +IFOFFSET,I ,1,1,0 +0 +* +*************************************************************************** +* 0 = *DEFAULT = Modal forces computed with DYNAMIC (t) wall normals +* 1 = Modal forces computed with FIXED (t=0) wall normals +* +IFIX_B_SURFS,I ,1,1,0 +0 +* +*************************************************************************** +* 0 = *DEFAULT = POFFSET = 0 +* !=0 = Aerodynamic forces computed with (P - POFFSET) +* +POFFSET,R ,1,1,0 +0.0 +* +*************************************************************************** +* File CFIPRM (inp) is the update/comunication file for AEROELASTICS +* - required to modify internal parameters and data +* +CFIPRM,L ,1,1,0 +'Edge_at.ainp ' +* +*************************************************************************** +* Controls IO format for external coupled solution +* 0 = use same file +* 1 = append _in and _out to filename +* +IPRM,I ,1,1,0 +0 +* +*************************************************************************** +* File CFIMOD (amod) is the structural input file +* - required only when the H coupling matrix is stored (in .bedg) +* - contains structural data : nodes, label, coordinates and modal shapes +* +CFIMOD,L ,1,1,0 +'Edge_ae.amod ' +* +*************************************************************************** +* File CFIMOT (mot) contains a tabulated modal timeseries : +* - either modal coordinates q(t) for prescribed motion +* - or modal force input Q(t) for coupled simulation +* +CFIMOT,L ,1,1,0 +'Edge_ae.amot ' +* +*************************************************************************** +* File CFIMOP (mop) is the modal parameters input file : +* - required for modal coupled options only (102) +* - contains modal parameters : frequency, damping, generalised_mass +* and initial state : q(t=0), q_dot(t=0) +* +CFIMOP,L ,1,1,0 +'Edge_ae.amop ' +* +*************************************************************************** +* File CFIMOS (mos) contains modes in grid perturbation form MODOPT: 1. +* Required for all modal options. +* +CFIMOS,L ,1,1,0 +'Edge.bmos ' +* +*************************************************************************** +* Filenames for surface-displacement modes MODOPT: 2 or 3. +* Format: prefix.suffix / imin imax istep +* +CFIDIS,L ,1,1,0 +'bdis/Edge.bdis / 1001 1006 1 ' +* +*************************************************************************** +* * +* ---------------- Aero-thermal solution options ---------------- * +* * +AEROTHERMALS,N ,0,0,14 +* +*************************************************************************** +* Thermal coupling option : +* 0 = No thermal coupling +* 100 = Modal fixed temperature surface +* 101 = Modal prescribed temperature +* 102 = Modal coupled +* 112 = Modal externally coupled +* 202 = Coupled to external solver (full model) +* +ISOOPT,I ,1,1,0 +0 +* +*************************************************************************** +* Controls where in the inner loop the thermal coupling is active : +* 0 = Never +* N>0 = Every N inner iterations (ignored for ISOOPT= 0, 100, 101) +* +NITIN,I ,1,1,0 +1 +* +*************************************************************************** +* External modal force input on/off (coupled solutions only) : +* 0 = No external forces +* 1 = Input from CFIMOT (mot) file (ignored for ISOOPT= 0, 100, 101, 112) +* +IFORCED,I ,1,1,0 +0 +* +*************************************************************************** +* File CFIPRM (inp) is the update/comunication file for AEROTHERMALS +* - required to modify internal parameters and data +* +CFIPRM,L ,1,1,0 +'Edge_at.ainp ' +* +*************************************************************************** +* Controls IO format for external coupled solution +* 0 = use same file +* 1 = append _in and _out to filename +* +IPRM,I ,1,1,0 +0 +* +*************************************************************************** +* File CFIMOD (amod) is the structural thermal input file +* - required only when the H coupling matrix is stored (in .bedg) +* - contains structural data : nodes, label, coordinates and modal shapes +* +CFIMOD,L ,1,1,0 +'Edge_at.amod ' +* +*************************************************************************** +* File CFIMOP (mop) is the modal parameters input file : +* - required for modal coupled options only +* - contains modal parameters : frequency, damping, generalised_mass +* and initial state : q(t=0), q_dot(t=0) +* +CFIMOP,L ,1,1,0 +'Edge_at.amop ' +* +*************************************************************************** +* File CFIMOT (mot) contains a tabulated modal timeseries : +* - either modal coordinates q(t) for prescribed motion +* - or modal force input Q(t) for coupled simulation +* +CFIMOT,L ,1,1,0 +'Edge_at.amot ' +* +*************************************************************************** +* Filenames for thermal modes +* format: prefix.suffix / imin imax istep +* +CFIDIS,L ,1,1,0 +'bdis/thermal_modes.bdis / 2001 2012 1 ' +* +*************************************************************************** +* Specify numerical scheme for heat implicit integration : +* 0.5 = Crank-Nicolson (suggested, no numerical damping) +* 2/3 = Galerkin +* 1.0 = Backward Euler +* Any value can be given to provide numerical damping, despite accuracy +* (ignored for ISOOPT= 0, 100, 101, 202) +* +NDAMPT,R ,1,1,0 +0.5 +* +*************************************************************************** +* Surface constant emissivity for radiation bc +* If 0.0, radiation is not considered +* +WALL_EMISSIVITY,R ,1,1,0 +0.0 +* +*************************************************************************** +* Background temperature for radiative heat transfer +* +BACK_TEMPERATURE,R ,1,1,0 +0.0 +* +*************************************************************************** +* Stefan-Boltzmann constant for radiation +* +STEF_BOLTZ,R ,1,1,0 +5.67E-8 +* +*************************************************************************** +* Specify coupling formulation with the thermal model : +* 0.0 = Neumann (through fluxes, fully explicit) +* 1.0 = Dirichlet (through temperatures, fully implicit) +* < 1.0 = Robyn (mixed formulation) +* (used for ISOOPT= 102, 112, 202) +* +RELAXT,R ,1,1,0 +0.5 +* +*************************************************************************** +* * +* ---------------- Gusts options ---------------- * +* * +GUSTS,N ,0,0,6 +* +*************************************************************************** +* Gust option : +* 0 = No gust +* 1 = 1-cos gust +* +ISOOPT,I ,1,1,0 +0 +* +*************************************************************************** +* Vector normal to gust plane +* cross-product of GUST_NORM x FREE_STREAM velocity vector +* determines direction of perturbation velocity +* +GUST_NORM,R ,1,3,0 +0.0 1.0 0.0 +* +*************************************************************************** +* Gust initial coordinate +* +ORIG,R ,1,3,0 +0.0 0.0 0.0 +* +*************************************************************************** +* Gust spatial length +* +LENGTH,R ,1,1,0 +1.0 +* +*************************************************************************** +* Gust perturbation velocity along PERT_DIR +* +PERT_VEL,R ,1,1,0 +1.0 +* +*************************************************************************** +* Initial time delay +* +T_DELAY,R ,1,1,0 +0.0 +* +*************************************************************************** +* * +* ---------------- MRF options ---------------- * +* * +MRFS,N ,0,0,8 +* +*************************************************************************** +* MRF option : +* 0 = No moving reference frame +* 1 = Grid velocity from file +* 2 = Sinusoidal grid velocity +* 3 = Sinusoidal angular velocity +* +IMRFOPT,I ,1,1,0 +0 +* +*************************************************************************** +* Normal to sinusodial grid veloctiy +* +SIN_NORM,R ,1,3,0 +0.0 1.0 0.0 +* +*************************************************************************** +* Frequency in hertz +* +SIN_FREQ,R ,1,1,0 +1.0 +* +*************************************************************************** +* Velocity amplitude of sinusoidal grid velocity +* +SIN_VEL,R ,1,1,0 +1.0 +* +*************************************************************************** +* Amplitude of sinusoidal motion in degrees +* +SIN_AMP,R ,1,1,0 +1.0 +* +*************************************************************************** +* Coordinates for one point on axis off rotation +* +OMGCOO_MRF,R ,1,3,0 +0.0 1.0 0.0 +* +*************************************************************************** +* Name of farfield BC to updated velocities for rotational motion +* +BNAME,L ,1,1,0 +'outer ' +* +*************************************************************************** +* Axis of rotation : +* 0 = x-axis +* 1 = y-axis +* 2 = z-axis +* +IAXIS,I ,1,1,0 +0 +* +*************************************************************************** +* * +* ------------- Trajectory solution options ---------------- * +* * +TRAJECTORY_DATA,N ,0,0,8 +* +*************************************************************************** +* Trajectory solution options : +* 0 = No trajectory computations +* 1 = Quasi-steady trajectory computations +* 2 = Unsteady trajectory computations +* +ITRAJEC,I ,1,1,0 +0 +* +*************************************************************************** +* Total number of iterations for trajectory computations +* +ITMXTRA,I ,1,1,0 +1 +* +*************************************************************************** +* If ITRAJEC = 1, time step for trajectory computations +* +DELTAT_QS,R ,1,1,0 +0.0 +* +*************************************************************************** +* Gravitational acceleration vector in main frame coordinates +* +GRAV,R ,3,1,0 +0.0 +0.0 +9.80665 +* +*************************************************************************** +* Number of substeps for 6DoF computations +* +NSUBST,I ,1,1,0 +1 +* +*************************************************************************** +* Increment for mesh modifications in the inner loop +* +NITIN,I ,1,1,0 +1 +* +*************************************************************************** +* Parameter controlling the grid check ( > 1.) +* +CHKMAX,R ,1,1,0 +10.0 +* +*************************************************************************** +* The trajectory file ( .atra ) +* +CFITRA,L ,1,1,0 +'Edge.atra ' +* +*************************************************************************** +* * +* ---------------- Propeller options ---------------- * +* * +*************************************************************************** +* File CFIDISK contains the input to the propeller disk model +* The model is used as a boundary condition +* The data file is not in FFA-format, it is copied from Multnas +* +CFIDISK,L ,1,1,0 +'prin.dat ' +* +*************************************************************************** +* * +* ----------- Low speed preconditioning options ----------- * +* * +*************************************************************************** +* 0 = No preconditioning +* 1 = Preconditioning for low Mach numbers used, Turkel/Choi&Merkle +* 2 = Preconditioning with art. diss. based on conservative variables +* Values fixed: RM0=1, RKBET1=1, RKBET2=1, ALPHAP=0, DELTA=0 +* +IPREPA,I ,1,1,0 +0 +* +*************************************************************************** +* RKBET2 preconditioning parameter, +* RKBET1=1, ALPHAP=0, DELTA=1 as default in Euranus +* +RKBET2,R ,1,1,0 +4.0 +* +*************************************************************************** +* RM0 preconditioning parameter, +* RKBET1=1, ALPHAP=0, DELTA=1 as default in Euranus +* +RM0,R ,1,1,0 +1.0 +* +*************************************************************************** +* 1 = Add the viscous correction to beta, +* 0 = DEFAULT, dont add it +* +IPREVIS,I ,1,1,0 +0 +* +*************************************************************************** +* * +* --------------- Number of iterations, CFL etc. --------------- * +* * +*************************************************************************** +* Number of iterations and type of time step +* +ITMAX,I ,1,1,0 +__ITMAX__ +* +*************************************************************************** +* Convergence criteria (orders of magnitude of reduction) +* +RESRED,R ,1,1,0 +-7.0 +* +*************************************************************************** +* Convergence criteria full multigrid (orders of magnitude +* of reduction required before including new grid level) +* +RESFMG,R ,1,1,0 +-4.5 +* +*************************************************************************** +* Inviscid CFL number +* <= 1.5 for explicit iterations (STSTCONV=1) +* Large for LU-SGS iterations (STSTCONV=2) +* Not used for implicit Krylov method (STSCONV=3) +* +CFL,R ,1,1,0 +1.25 +* +*************************************************************************** +* Initial CFL number for implicit GMRES calculations (STSCONV=3) +* Applied at first iteration, then increased with factor CFL_FACTOR_KSP +* +CFL_MIN_KSP,R ,1,1,0 +1.5 +* +*************************************************************************** +* Factor to increase CFL for implicit Krylov calculations (STSCONV=3) +* +CFL_FACTOR_KSP,R ,1,1,0 +1.2 +* +*************************************************************************** +* Maximum CFL number for implicit Krylov calculations (STSCONV=3) +* First value applied for residuals >= CFL_MAX_SWITCH +* Second value applied for residuals < CFL_MAX_SWITCH +* +CFL_MAX_KSP,R ,1,2,0 +10000.0 10000.0 +* +*************************************************************************** +* Residual, when to switch the maximum allowed CFL number (STSCONV=3) +* +CFL_MAX_SWITCH,R ,1,1,0 +-4.0 +* +*************************************************************************** +* Maximum CFL number in largest cell for implicit calculations (STSCONV=3) +* Reduction -> 1 often required for supersonic calculations +* +CFL_MAX_MAXVOL,R ,1,1,0 +10000.0 +* +*************************************************************************** +* Viscous CFL number : If > 0 --> Time step is minimum of inviscid +* and viscous time step +* If <= 0 --> Only inviscid CFL is used, and time +* step is harmonic average of inviscid +* and viscous time step +* +CFLVIS,R ,1,1,0 +-1.0 +* +*************************************************************************** +* Line-implicit CFL number >=1 +* CFLLI = 1 --> Explicit local time step +* CFLLI -> inf --> Line-implicit local time step +* +CFLLI,R ,1,1,0 +10000.0 +* +*************************************************************************** +* Line-implicit LHS artificial dissipation >0 +* Increase slightly if convergence problems encountered +* Too high values will degrade rate of convergence +* +EPS2LI,R ,1,1,0 +0.3 +* +*************************************************************************** +* * +* --------------- Miscellaneous options --------------- * +* * +*************************************************************************** +* Post processing options. Additional fields written to +* a separate solution file name in CFIPOST +* 0 = No post processing, default +* 1 = Cf, q, yplus for viscous calc. (INPRES=1) +* 2 = Mach, Cp, energy, temperature, total states and local time step +* 4 = Distance to the wall and laminar/turbulent field +* 8 = Residuals to all unknowns +* 16 = Reynolds stresses +* 32 = Gradients of the dependent variables +* 64 = Flow curvature vector +* 128 = Q criterion and abs(rograd) +* For several options sum up (1+4=5 for cf and wall distance etc.) +* +IPOST,I ,1,1,0 +1 +* +*************************************************************************** +* Sample post solution files (IPOST>0) to multiple (_it.bout) +* files every IPMULOU iterations. +* +IPMULOU,I ,1,1,0 +0 +* +*************************************************************************** +* EPS is used to avoid division by zero +* +EPS,R ,1,1,0 +1.0E-28 +* +*************************************************************************** +* Save the solution (.bout) and residual (.bres) files every IWRSOL +* iterations. These files are used for restarts. See also INPRES. +* +IWRSOL,I ,1,1,0 +100 +* +*************************************************************************** +* Output solution to file, runtime parameter +* +IOUTPT,I ,1,1,0 +0 +* +*************************************************************************** +* Sample the solution to multiple (_it.bout) files every IMULOU +* iterations. These files are for analysis only, not restarts. +* +IMULOU,I ,1,1,0 +0 +* +*************************************************************************** +* Output convergence stuff every ISTOUT iteration +* +ISTOUT,I ,1,1,0 +1 +* +*************************************************************************** +* Check the existence of new data in file update.ainp +* each BEDITFREQ iteration +* +BEDITFREQ,I ,1,1,0 +1 +* +*************************************************************************** +* Number of the residual on standard output every ISTOUT iteration +* 1 = *DEFAULT (density) +* +NRRES,I ,1,1,0 +1 +* +*************************************************************************** +* Region data file supplied (CFIREG) with regional data +* 0 = No data file supplied +* 1 = Data file supplied +* +IREGIONDATA,I ,1,1,0 +0 +* +*************************************************************************** +* Direction for lift force +* Direction for force 1 +* +IDCLP,R ,1,3,0 +__IDCLP__ +* +*************************************************************************** +* Direction for drag force +* Direction for force 2 +* +IDCDP,R ,1,3,0 +__IDCDP__ +* +*************************************************************************** +* Direction for side force +* Direction for force 3 +* +IDCCP,R ,1,3,0 +__IDCCP__ +* +*************************************************************************** +* Direction for pitch moment +* Direction for moment 1 +* +IDCMP,R ,1,3,0 +__IDCMP__ +* +*************************************************************************** +* Direction for yaw moment +* Direction for moment 2 +* +IDCNP,R ,1,3,0 +__IDCNP__ +* +*************************************************************************** +* Direction for roll moment +* Direction for moment 3 +* +IDCRP,R ,1,3,0 +__IDCRP__ +* +*************************************************************************** +* Point for moment +* +IXMP,R ,1,3,0 +__IXMP__ +* +*************************************************************************** +* Reference area to non-dimensionalize forces and moments +* +SREF,R ,1,1,0 +__SREF__ +* +*************************************************************************** +* Reference chord for non-dimensionalizing moment +* +CREF,R ,1,1,0 +__CREF__ +* +*************************************************************************** +* Reference width for non-dimensionalizing moment +* +BREF,R ,1,1,0 +__BREF__ +* +*************************************************************************** +* * +* --------------- Vortex generator options --------------- * +* * +*************************************************************************** +* Number of vortex generator (VG) configuration to be used +* If no VG model is applied VGCONFIG = 0 +* +VGCONFIG,I ,1,1,0 +0 +* +*************************************************************************** +* Parameter file with jBAY and/or RANS vortex generator input +* Used by program under program/VG_identify where an example file +* can be found +* +CFVGNAME,L ,1,1,0 +'vg_config.adat ' +* +*************************************************************************** +* Scaling factor for KCONST, KCONST=VGKCONSTSCALE*PI, used by RANS VG +* +VGKCONSTSCALE,R ,1,1,0 +1.8 +* +*************************************************************************** +* * +* --------------- File names --------------- * +* * +*************************************************************************** +* The mesh file ( .bmsh ) +* +CFIMSH,L ,1,1,0 +'../grid/__BMSH__ ' +* +*************************************************************************** +* Edge file name from the preprocessor ( .bedg ) +* +CFIEDG,L ,1,1,0 +'../grid/Edge.bedg ' +* +*************************************************************************** +* The boundary condition file ( .aboc ) +* +CFIBOC,L ,1,1,0 +'../grid/__ABOC__ ' +* +*************************************************************************** +* The residual file ( .bres ) +* +CFIRES,L ,1,1,0 +'Edge.bres ' +* +*************************************************************************** +* The solution file ( .bout ) +* Also initial solution for restart (INPRES = 2) +* +CFIOUT,L ,1,1,0 +'Edge.bout ' +* +*************************************************************************** +* CFIMEAN is the OUTPUT file for time-averaging(_mean.bout) +* +CFIMEAN,L ,1,1,0 +'Edge_mean.bout ' +* +*************************************************************************** +* The initial solution file (INPRES = 1) ( .bini ) +* +CFIINI,L ,1,1,0 +'Edge.bini ' +* +*************************************************************************** +* Post processing solution file (IPOST > 0) ( .bout ) +* +CFIPOST,L ,1,1,0 +'Post.bout ' +* +*************************************************************************** +* History recording file (IACHIS=1, IPROBEHIS=1, IAIPHIS=1 or ISAMMSH>=1) +* +CFIHIS,L ,1,1,0 +'history.bhis ' +* +*************************************************************************** +* Regional data file (IREGIONDATA = 1) (.areg, .breg) +* +CFIREG,L ,1,1,0 +'Edge.areg ' +* +*************************************************************************** +* Boundary sampling input file (ISAMP = 1) +* +CFIBSI,L ,1,1,0 +'Edge_bsm.asmp ' +* +*************************************************************************** +* Aerodynamic coeff history input file (IACHIS = 1) +* +CFIACI,L ,1,1,0 +'Edge_ach.asmp ' +* +*************************************************************************** +* Probe coeff history input file (IPROBEHIS = 1) +* +CFIPRB,L ,1,1,0 +'Edge_probe.asmp ' +* +*************************************************************************** +* Inlet coeff history input file (IAIPHIS = 1) +* +CFIAIP,L ,1,1,0 +'Edge_aip.asmp ' +* +*************************************************************************** +* Points history input file (NPTHIS >= 1) +* +CFIPOINTS,L ,1,1,0 +'Edge_points.asmp ' +* +*************************************************************************** +* Embedded mesh file for sampling (ISAMMSH >= 1) +* +CFISAMMSH,L ,1,1,0 +'Edge_mshsamp.bmsh ' +* +*************************************************************************** +* * +* ---------------- Turbulence models ---------------- * +* * +*************************************************************************** +* 0 = Laminar +* 2 = RANS models +* 3 = DES models +* 4 = LES models +* +ITURB,I ,1,1,0 +2 +* +*************************************************************************** +* Choice of turbulence model : (*=DEFAULT , !=recommended) +* --------------------------------------- +* One-equation models: +* Spalart-Allmaras one-eq model +* Spalart-Allmaras Edwards +* Rung SALSA (!) +* Two-equation models: +* W&J EARSM + Hellsten k-omega (*) +* std Wilcox k-omega +* Menter BSL k-omega +* Menter SST k-omega (!) +* Menter SST k-omega + Transition +* Kok_TNT k-omega +* Wilcox LRN k-omega +* PDH LRN k-omega +* Rung LLR k-omega +* Rung RQEVM + std k-omega +* Algebraic Reynolds-Stress models: +* GWJ Generalized EARSM + std k-omega +* W&J EARSM + std k-omega +* W&J EARSM + Kok_TNT k-omega +* W&J EARSM + Menter BSL k-omega 2009 +* W&J CC-EARSM + std k-omega +* W&J CC-EARSM + Menter BSL k-omega +* W&J CC-EARSM + Hellsten k-omega +* Reynolds-Stress Transport models: +* SSG DRSM + std k-omega +* SSG DRSM + Hellsten k-omega +* W&J DRSM + std k-omega +* W&J DRSM + Hellsten k-omega +* W&J DAMPED DRSM + Hellsten k-omega +* --------------------------------------- +* DES and hybrid RANS-LES models : +* Spalart-Allmaras DES model +* Spalart-Allmaras DDES (!) +* Spalart-Allmaras IDDES +* Rung SALSA-DES +* Rung SALSA-DDES (!) +* Rung SALSA-IDDES +* Menter SST-DES k-omega +* Menter SST-DDES k-omega (!) +* Menter SST-IDDES k-omega +* Peng hybrid HYB0 model +* --------------------------------------- +* LES models : +* Smagorinsky SGS model +* Smagorinsky SGS with wall damping +* Spalart-Allmaras SGS model +* Yoshizawa k-eq SGS model +* +TURB_MOD_NAME,L ,1,1,0 +'Spalart-Allmaras one-eq model ' +* +*************************************************************************** +* 2-eq. turb. discretization type : +* 0 = Central +* 1 = Upwind +* +IUPWKZ,I ,1,1,0 +0 +* +*************************************************************************** +* 2nd order dissipation coefficient +* For turbulence models using central scheme only +* +VIS2KZ,R ,1,1,0 +1.0 +* +*************************************************************************** +* 4th order dissipation coefficient +* For turbulence models using central scheme only +* +VIS4KZ,R ,1,1,0 +0.05 +* +*************************************************************************** +* Entropy fix for upwind 2-eq. turbulence : +* |TURFIX| < 1. : Not valid (equivalent to TURFIX=0) +* |TURFIX| > 1. : Entropy fix scaled isotropically with the spectral +* radius (SR), = (TURFIX-1.)*SR +* TURFIX > 0 Spectral radius SR = U*N + A +* TURFIX < 0 Spectral radius SR = U*N + |U| +* Where A is the speed of sound. TURFIX < 0 is used for low Mach +* numbers to decrease the numerical dissipation. +* +TURFIX,R ,1,1,0 +-1.1 +* +*************************************************************************** +* Order of turbulent upwind scheme : +* 1 = 1st order +* 2 = 2nd order +* +IORDKZ,I ,1,1,0 +2 +* +*************************************************************************** +* * +* --------------- Turbulence model definitions --------------- * +* * +TURB_MOD_LIST,N ,0,0,39 +* +*************************************************************************** +* * +* --------------- Spalart-Allmaras one-eq model ---------- * +* * +TURB_MOD,L ,1,1,20 +'Spalart-Allmaras one-eq model ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACT1,R ,1,1,0 +1.0 +* +SACT2,R ,1,1,0 +2.0 +* +SACT3,R ,1,1,0 +1.1 +* +SACT4,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSAM ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Spalart-Allmaras Edwards ---------- * +* * +TURB_MOD,L ,1,1,18 +'Spalart-Allmaras Edwards ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACT1,R ,1,1,0 +1.0 +* +SACT2,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSAE ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Rung SALSA ---------- * +* * +TURB_MOD,L ,1,1,16 +'Rung SALSA ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSALSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- std Wilcox k-omega --------------- * +* * +TURB_MOD,L ,1,1,12 +'std Wilcox k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTKW ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSTKW ' +* +*************************************************************************** +* * +* --------------- Wilcox LRN k-omega --------------- * +* * +TURB_MOD,L ,1,1,12 +'Wilcox LRN k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.56 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +WALL,R ,1,1,0 +1.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSLRKWW ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXLRKWW ' +* +*************************************************************************** +* * +* --------------- Rung LLR k-omega --------------- * +* * +TURB_MOD,L ,1,1,11 +'Rung LLR k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +BETA,R ,1,1,0 +1.83 +* +BETAS,R ,1,1,0 +0.27777 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +1.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTLLR ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXLLR ' +* +*************************************************************************** +* * +* --------------- Rung RQEVM + std k-omega --------------- * +* * +TURB_MOD,L ,1,1,12 +'Rung RQEVM + std k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +1.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTRQEVM ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXRQEVM ' +* +*************************************************************************** +* * +* --------------- PDH LRN k-omega --------------- * +* * +TURB_MOD,L ,1,1,13 +'PDH LRN k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.42 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +1.25 0.7407 +* +SIGMAD_CROSS,R ,1,1,0 +0.75 +* +WALL,R ,1,1,0 +1.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSLRKWP ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXLRKWP ' +* +*************************************************************************** +* * +* --------------- Kok_TNT k-omega --------------- * +* * +TURB_MOD,L ,1,1,13 +'Kok_TNT k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.553 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.66666 0.5 +* +SIGMAD_CROSS,R ,1,1,0 +0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTCD ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSTKW ' +* +*************************************************************************** +* * +* --------------- Menter BSL k-omega --------------- * +* * +TURB_MOD,L ,1,1,17 +'Menter BSL k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.55317 +* +ALPHA2,R ,1,1,0 +0.4403547 +* +BETA,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZBSL ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSKWBSL ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSTKW ' +* +*************************************************************************** +* * +* --------------- Menter SST k-omega --------------- * +* * +TURB_MOD,L ,1,1,18 +'Menter SST k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.55317 +* +ALPHA2,R ,1,1,0 +0.4403547 +* +BETA,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.85 0.5 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +A1,R ,1,1,0 +0.31 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZBSL ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSKWSST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSST ' +* +*************************************************************************** +* * +* --------------- MENTER SST k-omega + Transition --------------- * +* * +TURB_MOD,L ,1,1,40 +'Menter SST k-omega + Transition ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Transition model options ----- * +* * +*************************************************************************** +* Governing correlation functions: +* 1 = *DEFAULT = Tomac-Pettersson +* +ICORRF,I ,1,1,0 +1 +* +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If MUT exists ----- * +* * +MUT_AVAIL,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Turb_kin_energy exists ----- * +* * +K_AVAIL,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +4 +* +NAME_UNK,S ,1,4,0 +'turb_kin_energy ' 'turb_omega ' 'intermittency ' 're_theta_t ' +* +*************************************************************************** +* * +* ----- Number and names of additional turb fields ----- * +* * +NAME_EX,S ,1,4,0 +'turb_viscosity ' 'laminar_turbulen' 'flt ' 'retc ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.55317 +* +ALPHA2,R ,1,1,0 +0.4403547 +* +BETA,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,4,0 +0.85 0.5 1.0 2.0 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +A1,R ,1,1,0 +0.31 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* * +* ----- Transition model constants ----- * +* * +CA1,R ,1,1,0 +2.0 +* +CA2,R ,1,1,0 +0.06 +* +CE1,R ,1,1,0 +1.0 +* +CE2,R ,1,1,0 +50.0 +* +CALPHA,R ,1,1,0 +0.5 +* +CTT,R ,1,1,0 +0.03 +* +S1,R ,1,1,0 +2.0 +* +FLTC1,R ,1,1,0 +0.3 +* +FLTC2,R ,1,1,0 +60.0 +* +FLTC3,R ,1,1,0 +53000.0 +* +FLTC4,R ,1,1,0 +0.0 +* +RETCC1,R ,1,1,0 +0.9 +* +RETCC2,R ,1,1,0 +0.1 +* +RETCC3,R ,1,1,0 +490.0 +* +RETCC4,R ,1,1,0 +390.0 +* +RETCC5,R ,1,1,0 +150.0 +* +LTLIM,R ,1,2,0 +-0.1 0.1 +* +TULIM,R ,1,1,0 +0.027 +* +RETTLIM,R ,1,2,0 +20.0 1450.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKBSLT ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,2,0 +'HSKWSST ' 'HSINTRETT ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,2,0 +'FXSST ' 'FXINTRETT ' +* +*************************************************************************** +* * +* --------------- GWJ Generalized EARSM + std k-omega --------------- * +* * +TURB_MOD,L ,1,1,16 +'GWJ Generalized EARSM + std k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +C1,R ,1,1,0 +1.8 +* +C,R ,1,1,0 +0.56 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +0.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTKW ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXGWJA ' +* +*************************************************************************** +* * +* --------------- W&J EARSM + std k-omega --------------- * +* * +TURB_MOD,L ,1,1,15 +'W&J EARSM + std k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +C1,R ,1,1,0 +1.8 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +0.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTKW ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXWJAR ' +* +*************************************************************************** +* * +* --------------- W&J EARSM + Kok_TNT k-omega --------------- * +* * +TURB_MOD,L ,1,1,16 +'W&J EARSM + Kok_TNT k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.525 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.66666 0.55 +* +SIGMAD_CROSS,R ,1,1,0 +0.3 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +C1,R ,1,1,0 +1.8 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +0.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTCD ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXWJAR ' +* +*************************************************************************** +* * +* --------------- W&J EARSM + Menter BSL k-omega 2009 ---------- * +* * +TURB_MOD,L ,1,1,23 +'W&J EARSM + Menter BSL k-omega 2009 ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,2,0 +'turb_viscosity ' 'mut_simp_diff ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +ALPHA2,R ,1,1,0 +0.44035 +* +BETA,R ,1,1,0 +0.075 +* +BETA1,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +0.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +A1,R ,1,1,0 +1.245 +* +A3,R ,1,1,0 +1.8 +* +A4,R ,1,1,0 +2.25 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZBSL ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSKWBSL ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXWJAR ' +* +*************************************************************************** +* * +* --------------- W&J EARSM + Hellsten k-omega --------------- * +* * +TURB_MOD,L ,1,1,24 +'W&J EARSM + Hellsten k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.518 +* +ALPHA2,R ,1,1,0 +0.44 +* +BETA,R ,1,1,0 +0.0747 +* +BETA1,R ,1,1,0 +0.0747 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +1.1 0.53 +* +SIGMA2,R ,1,2,0 +1.1 1.0 +* +SIGMAD1,R ,1,1,0 +1.0 +* +SIGMAD2,R ,1,1,0 +0.4 +* +CMIX,R ,1,1,0 +1.5 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +2.2 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +C1,R ,1,1,0 +1.8 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZHELLST ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSHELLST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXWJAR ' +* +*************************************************************************** +* * +* --------------- W&J CC-EARSM + std k-omega --------------- * +* * +TURB_MOD,L ,1,1,17 +'W&J CC-EARSM + std k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +*************************************************************************** +* * +* ----- If curvature correction ----- * +* * +CURV_CORR,I ,1,0,0 +* +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +C1,R ,1,1,0 +1.8 +* +A0,R ,1,1,0 +-0.72 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +0.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSTKW ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXWJAR ' +* +*************************************************************************** +* * +* --------------- W&J CC-EARSM + Menter BSL k-omega --------------- * +* * +TURB_MOD,L ,1,1,23 +'W&J CC-EARSM + Menter BSL k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- If curvature correction ----- * +* * +CURV_CORR,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +ALPHA2,R ,1,1,0 +0.44035 +* +BETA,R ,1,1,0 +0.075 +* +BETA1,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.5 0.5 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +0.0 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +C1,R ,1,1,0 +1.8 +* +A0,R ,1,1,0 +-0.72 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZBSL ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSKWBSL ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXWJAR ' +* +*************************************************************************** +* * +* --------------- W&J CC-EARSM + Hellsten k-omega --------------- * +* * +TURB_MOD,L ,1,1,26 +'W&J CC-EARSM + Hellsten k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If Turb_extra_anis exists ----- * +* * +AEX_AVAIL,I ,1,0,0 +* +*************************************************************************** +* * +* ----- If curvature correction ----- * +* * +CURV_CORR,I ,1,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.518 +* +ALPHA2,R ,1,1,0 +0.44 +* +BETA,R ,1,1,0 +0.0747 +* +BETA1,R ,1,1,0 +0.0747 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +1.1 0.53 +* +SIGMA2,R ,1,2,0 +1.1 1.0 +* +SIGMAD1,R ,1,1,0 +1.0 +* +SIGMAD2,R ,1,1,0 +0.4 +* +CMIX,R ,1,1,0 +1.5 +* +*************************************************************************** +* Diffusion correction of EARSM model +* +CD,R ,1,1,0 +2.2 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +C1,R ,1,1,0 +1.8 +* +A0,R ,1,1,0 +-0.72 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZHELLST ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,1,0 +'HSSHELLST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXWJAR ' +* +*************************************************************************** +* * +* --------------- W&J DRSM + std k-omega --------------- * +* * +TURB_MOD,L ,1,1,20 +'W&J DRSM + std k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If Reynolds_stress exists ----- * +* * +RS_AVAIL,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,2,0 +5 7 +* +NAME_UNK,S ,1,12,0 +'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'turb_omega ' 'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'RS_13 ' 'RS_23 ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,2,0 +'turb_kin_energy ' 'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,12,0 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Pressure-strain model constants ----- * +* * +PSC10,R ,1,1,0 +4.6 +* +PSC11,R ,1,1,0 +1.24 +* +PSC2,R ,1,1,0 +0.47 +* +PSC2S,R ,1,1,0 +0.0 +* +PSC3,R ,1,1,0 +2.0 +* +PSC4,R ,1,1,0 +0.56 +* +PSC5,R ,1,1,0 +0.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,2,0 +'HSSTKW ' 'HSSRST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXXRST ' +* +*************************************************************************** +* * +* --------------- W&J DRSM + Hellsten k-omega --------------- * +* * +TURB_MOD,L ,1,1,28 +'W&J DRSM + Hellsten k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If Reynolds_stress exists ----- * +* * +RS_AVAIL,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,2,0 +5 7 +* +NAME_UNK,S ,1,12,0 +'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'turb_omega ' 'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'RS_13 ' 'RS_23 ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,2,0 +'turb_kin_energy ' 'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.518 +* +ALPHA2,R ,1,1,0 +0.44 +* +BETA,R ,1,1,0 +0.0747 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,12,0 +1.1 1.1 1.1 1.1 0.53 1.1 1.1 1.1 1.1 1.1 1.1 0.53 +* +SIGMA2,R ,1,12,0 +1.1 1.1 1.1 1.1 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.0 +* +SIGMAD1,R ,1,1,0 +1.0 +* +SIGMAD2,R ,1,1,0 +0.4 +* +CMIX,R ,1,1,0 +1.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Pressure-strain model constants ----- * +* * +PSC10,R ,1,1,0 +4.6 +* +PSC11,R ,1,1,0 +1.24 +* +PSC2,R ,1,1,0 +0.47 +* +PSC2S,R ,1,1,0 +0.0 +* +PSC3,R ,1,1,0 +2.0 +* +PSC4,R ,1,1,0 +0.56 +* +PSC5,R ,1,1,0 +0.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZHELLST ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,2,0 +'HSSHELLST ' 'HSSRST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXXRST ' +* +*************************************************************************** +* * +* --------------- W&J DAMPED DRSM + Hellsten k-omega --------------- * +* * +TURB_MOD,L ,1,1,31 +'W&J DAMPED DRSM + Hellsten k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If Reynolds_stress exists ----- * +* * +RS_AVAIL,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,2,0 +5 7 +* +NAME_UNK,S ,1,12,0 +'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'turb_omega ' 'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'RS_13 ' 'RS_23 ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,2,0 +'turb_kin_energy ' 'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.518 +* +ALPHA2,R ,1,1,0 +0.44 +* +BETA,R ,1,1,0 +0.0747 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,12,0 +1.1 1.1 1.1 1.1 0.53 1.1 1.1 1.1 1.1 1.1 1.1 0.53 +* +SIGMA2,R ,1,12,0 +1.1 1.1 1.1 1.1 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.0 +* +SIGMAD1,R ,1,1,0 +1.0 +* +SIGMAD2,R ,1,1,0 +0.4 +* +CMIX,R ,1,1,0 +1.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Pressure-strain model constants ----- * +* * +PSC10,R ,1,1,0 +4.6 +* +PSC11,R ,1,1,0 +1.24 +* +PSC2,R ,1,1,0 +0.47 +* +PSC2S,R ,1,1,0 +0.0 +* +PSC3,R ,1,1,0 +2.0 +* +PSC4,R ,1,1,0 +0.56 +* +PSC5,R ,1,1,0 +0.0 +* +PSDC10,R ,1,1,0 +0.57 +* +PSDC11,R ,1,1,0 +0.9 +* +PSAPLUS,R ,1,1,0 +26.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZHELLST ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,2,0 +'HSSHELLST ' 'DAMPED_HSSRST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXXRST ' +* +*************************************************************************** +* * +* --------------- SSG DRSM + std k-omega --------------- * +* * +TURB_MOD,L ,1,1,20 +'SSG DRSM + std k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If Reynolds_stress exists ----- * +* * +RS_AVAIL,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs (2D and 3D) ----- * +* * +NTEQ,I ,1,2,0 +5 7 +* +NAME_UNK,S ,1,12,0 +'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'turb_omega ' 'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'RS_13 ' 'RS_23 ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,2,0 +'turb_kin_energy ' 'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.556 +* +BETA,R ,1,1,0 +0.075 +* +BETAS,R ,1,1,0 +0.09 +* +*************************************************************************** +* * +* ----- One for each equation first in 2D and then in 3D ----- * +* * +SIGMA,R ,1,12,0 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Pressure-strain model constants ----- * +* * +PSC10,R ,1,1,0 +3.4 +* +PSC11,R ,1,1,0 +1.8 +* +PSC2,R ,1,1,0 +0.8 +* +PSC2S,R ,1,1,0 +1.3 +* +PSC3,R ,1,1,0 +1.25 +* +PSC4,R ,1,1,0 +0.4 +* +PSC5,R ,1,1,0 +4.2 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,2,0 +'HSSTKW ' 'HSSRST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity and K) ----- * +* * +EXTRVA,S ,1,1,0 +'FXXRST ' +* +*************************************************************************** +* * +* --------------- SSG DRSM + Hellsten k-omega --------------- * +* * +TURB_MOD,L ,1,1,28 +'SSG DRSM + Hellsten k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- If Reynolds_stress exists ----- * +* * +RS_AVAIL,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs (2D and 3D) ----- * +* * +NTEQ,I ,1,2,0 +5 7 +* +NAME_UNK,S ,1,12,0 +'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'turb_omega ' 'RS_11 ' 'RS_22 ' 'RS_33 ' 'RS_12 ' 'RS_13 ' 'RS_23 ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,2,0 +'turb_kin_energy ' 'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +ALPHA,R ,1,1,0 +0.518 +* +ALPHA2,R ,1,1,0 +0.44 +* +BETA,R ,1,1,0 +0.0747 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,12,0 +1.1 1.1 1.1 1.1 0.53 1.1 1.1 1.1 1.1 1.1 1.1 0.53 +* +SIGMA2,R ,1,12,0 +1.1 1.1 1.1 1.1 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.0 +* +SIGMAD1,R ,1,1,0 +1.0 +* +SIGMAD2,R ,1,1,0 +0.4 +* +CMIX,R ,1,1,0 +1.5 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0E20 +* +*************************************************************************** +* * +* ----- Pressure-strain model constants ----- * +* * +PSC10,R ,1,1,0 +3.4 +* +PSC11,R ,1,1,0 +1.8 +* +PSC2,R ,1,1,0 +0.8 +* +PSC2S,R ,1,1,0 +1.3 +* +PSC3,R ,1,1,0 +1.25 +* +PSC4,R ,1,1,0 +0.4 +* +PSC5,R ,1,1,0 +4.2 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZHELLST ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOUKZ,S ,1,2,0 +'HSSHELLST ' 'HSSRST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity and K) ----- * +* * +EXTRVA,S ,1,1,0 +'FXXRST ' +* +*************************************************************************** +* * +* --------------- Peng hybrid HYB0 model ---------- * +* * +TURB_MOD,L ,1,1,9 +'Peng hybrid HYB0 model ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +0 +* +NAME_UNK,S ,1,1,0 +'zero_equation ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,2,0 +'turb_viscosity ' 'rans_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CSGS,R ,1,1,0 +0.12 +* +CKSGS,R ,1,1,0 +0.0 +* +SIGMA,R ,1,1,0 +1.0 +* +PRT,R ,1,1,0 +0.4 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXHYB0P ' +* +*************************************************************************** +* * +* --------------- Spalart-Allmaras DES model ---------- * +* * +TURB_MOD,L ,1,1,17 +'Spalart-Allmaras DES model ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDES,R ,1,1,0 +0.65 +* +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSDESSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Spalart-Allmaras DDES ---------- * +* * +TURB_MOD,L ,1,1,17 +'Spalart-Allmaras DDES ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDES,R ,1,1,0 +0.65 +* +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSDDESSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Spalart-Allmaras IDDES ---------- * +* * +TURB_MOD,L ,1,1,17 +'Spalart-Allmaras IDDES ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDES,R ,1,1,0 +0.65 +* +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSIDDESSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Menter SST-DES k-omega --------------- * +* * +TURB_MOD,L ,1,1,20 +'Menter SST-DES k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDESKW,R ,1,1,0 +0.78 +* +CDESKE,R ,1,1,0 +0.61 +* +ALPHA,R ,1,1,0 +0.55317 +* +ALPHA2,R ,1,1,0 +0.4403547 +* +BETA,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.85 0.5 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +A1,R ,1,1,0 +0.31 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZBSL ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSDESSST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSST ' +* +*************************************************************************** +* * +* --------------- Menter SST-DDES k-omega --------------- * +* * +TURB_MOD,L ,1,1,20 +'Menter SST-DDES k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDESKW,R ,1,1,0 +0.78 +* +CDESKE,R ,1,1,0 +0.61 +* +ALPHA,R ,1,1,0 +0.55317 +* +ALPHA2,R ,1,1,0 +0.4403547 +* +BETA,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.85 0.5 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +A1,R ,1,1,0 +0.31 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZBSL ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSDDESSST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSST ' +* +*************************************************************************** +* * +* --------------- Menter SST-IDDES k-omega --------------- * +* * +TURB_MOD,L ,1,1,20 +'Menter SST-IDDES k-omega ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +2 +* +NAME_UNK,S ,1,2,0 +'turb_kin_energy ' 'turb_omega ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDESKW,R ,1,1,0 +0.78 +* +CDESKE,R ,1,1,0 +0.61 +* +ALPHA,R ,1,1,0 +0.55317 +* +ALPHA2,R ,1,1,0 +0.4403547 +* +BETA,R ,1,1,0 +0.075 +* +BETA2,R ,1,1,0 +0.0828 +* +BETAS,R ,1,1,0 +0.09 +* +SIGMA,R ,1,2,0 +0.85 0.5 +* +SIGMA2,R ,1,2,0 +1.0 0.856 +* +A1,R ,1,1,0 +0.31 +* +WALL,R ,1,1,0 +10.0 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISKZBSL ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSIDDESSST ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSST ' +* +*************************************************************************** +* * +* --------------- Rung SALSA-DES ---------- * +* * +TURB_MOD,L ,1,1,17 +'Rung SALSA-DES ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDES,R ,1,1,0 +0.65 +* +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSDESSALSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Rung SALSA-DDES ---------- * +* * +TURB_MOD,L ,1,1,17 +'Rung SALSA-DDES ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDES,R ,1,1,0 +0.65 +* +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSDDESSALSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Rung SALSA-IDDES ---------- * +* * +TURB_MOD,L ,1,1,17 +'Rung SALSA-IDDES ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDES,R ,1,1,0 +0.65 +* +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSIDDESSALSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSAM ' +* +*************************************************************************** +* * +* --------------- Smagorinsky SGS model ---------- * +* * +TURB_MOD,L ,1,1,8 +'Smagorinsky SGS model ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +0 +* +NAME_UNK,S ,1,1,0 +'zero_equation ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CSMAG,R ,1,1,0 +0.2 +* +CKSMG,R ,1,1,0 +0.0 +* +SIGMA,R ,1,1,0 +1.0 +* +PRT,R ,1,1,0 +0.4 +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity and kin. energy) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSGSSMG ' +* +*************************************************************************** +* * +* --------------- Smagorinsky SGS with wall damping ---------- * +* * +TURB_MOD,L ,1,1,9 +'Smagorinsky SGS with wall damping ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +0 +* +NAME_UNK,S ,1,1,0 +'zero_equation ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CSMAG,R ,1,1,0 +0.2 +* +CKSMG,R ,1,1,0 +0.0 +* +SIGMA,R ,1,1,0 +1.0 +* +PRT,R ,1,1,0 +0.4 +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity and kin. energy) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSGSSMG2 ' +* +*************************************************************************** +* * +* --------------- Spalart-Allmaras SGS model ---------- * +* * +TURB_MOD,L ,1,1,17 +'Spalart-Allmaras SGS model ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- If wall distance required ----- * +* * +WALL_DIST,N ,0,0,0 +* +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_work_vt ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CDES,R ,1,1,0 +0.65 +* +SACB1,R ,1,1,0 +0.1355 +* +SACB2,R ,1,1,0 +0.622 +* +SACW1,R ,1,1,0 +3.24 +* +SACW2,R ,1,1,0 +0.3 +* +SACW3,R ,1,1,0 +2.0 +* +SACV1,R ,1,1,0 +7.1 +* +SIGMA,R ,1,1,0 +1.5 +* +PRT,R ,1,1,0 +0.9 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISSA ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSLESSA ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSGSSA ' +* +*************************************************************************** +* * +* --------------- Yoshizawa SGS ---------- * +* * +TURB_MOD,L ,1,1,11 +'Yoshizawa k-eq SGS model ' +* +*************************************************************************** +* * +* ----- Turbulence model program logics ----- * +* * +*************************************************************************** +* * +* ----- Number and names of turb eqs ----- * +* * +NTEQ,I ,1,1,0 +1 +* +NAME_UNK,S ,1,1,0 +'turb_kin_energy ' +* +*************************************************************************** +* * +* ----- Names of additional turb fields ----- * +* * +NAME_EX,S ,1,1,0 +'turb_viscosity ' +* +*************************************************************************** +* * +* ----- Turbulence model constants ----- * +* * +CKMU,R ,1,1,0 +0.07 +* +CEPS,R ,1,1,0 +1.05 +* +SIGMA,R ,1,1,0 +1.0 +* +PRT,R ,1,1,0 +0.4 +* +*************************************************************************** +* Coefficient to multiply the limit of the turbulent production +* PLIM = PROLIM*RHO*RK*SQRT(PROD/MUTC) +* +PROLIM,R ,1,1,0 +1.0 +* +*************************************************************************** +* * +* ----- Turbulence model subroutines ----- * +* * +*************************************************************************** +* * +* ----- Viscous terms ----- * +* * +FVISF,S ,1,1,0 +'GVISLESYO ' +* +*************************************************************************** +* * +* ----- Source terms ----- * +* * +GSOULDES,S ,1,1,0 +'HSLESYO ' +* +*************************************************************************** +* * +* ----- Extra fields (turbulent viscosity) ----- * +* * +EXTRVA,S ,1,1,0 +'FXSGSYO ' +* +*************************************************************************** +* * +* --------------- Preprocessor -------------- * +* * +*************************************************************************** +* Coarsening ratio in each dimension ( 1 < CRDIM ) +* +CRDIM,R ,1,1,0 +2.0 +* +*************************************************************************** +* Maximum number of coarser grid levels to be generated +* +NLEVEL,I ,1,1,0 +5 +* +*************************************************************************** +* Coarsening ratio in the prismatic layer ( CRATIOB > 1.0) +* +CRATIOB,R ,1,1,0 +4.0 +* +*************************************************************************** +* Reduction of target number of agglomerated cells close to boundaries, +* >=1 if active +* +NAGGLTBC,I ,1,1,0 +0 +* +*************************************************************************** +* Number of fine layers (nodes) where NAGGLTBC apply, >=1 if active +* +NLAYERTBC,I ,1,1,0 +0 +* +*************************************************************************** +* Number of partitions. NPART > 1 specifies a parallel calculation. +* Used by both flow solver and preprocessor +* +NPART,I ,1,1,0 +__NPART__ +* +*************************************************************************** +* Node weight in implicit lines. Default 2000, can be reduced to 1000 +* if LINEIM=0. No effect for Euler meshes or if STR_LINES_OPT>1 +* +METIS_L_V_WEIGHT,I ,1,1,0 +2000 +* +*************************************************************************** +* 1 = Account for stretched lines in partitioning and agglomeration +* 2 = Account for stretched lines in agglomeration only +* 3 = Do not account for stretched lines at all +* +STR_LINES_OPT,I ,1,1,0 +1 +* +*************************************************************************** +* Type of edge coloring : +* 0 = No coloring +* 1 = *DEFAULT = Cache reordering trying all algorithms choosing the best +* 2 = Vector coloring +* 3 = Cache reordering using saw1 algorithm +* 4 = Cache reordering using saw2 algorithm +* 5 = Cache reordering using bfs1 algorithm +* 6 = Cache reordering using bfs2 algorithm +* 7 = Cache reordering using bfs3 algorithm +* +COLTYPE,I ,1,1,0 +1 +* +*************************************************************************** +* Parameter for specifying laminar areas +* 0 = No laminar areas +* 1 = Laminar areas specified in the file name of CFILAM +* +LAMAREAS,I ,1,1,0 +0 +* +*************************************************************************** +* The file containing laminar areas ( .alam, .blam ) +* +CFILAM,L ,1,1,0 +'Edge.alam ' +* +*************************************************************************** +* 0 = No wall distance field +* 1 = Generate wall distance field +* +IWALLDIS,I ,1,1,0 +0 +* +*************************************************************************** +* * +* --------------- Adaption parameters -------------- * +* * +*************************************************************************** +* Adaption parameters taken from file: refinement_data.aref +* 0 = Data in this file used +* 1 = Data in refinement_data.aref used +* +EXTADAPT,I ,1,1,0 +0 +* +*************************************************************************** +* Maximum cell size (dimensional) +* +CELMAX,R ,1,1,0 +0.7 +* +*************************************************************************** +* Minimum cell size (dimensional) +* +CELMIN,R ,1,1,0 +0.1 +* +*************************************************************************** +* Maximum indicator change in one cell +* +CELFLO,R ,1,1,0 +0.05 +* +*************************************************************************** +* Change number of nodes maximum by this factor +* +RMAGNI,R ,1,1,0 +4.0 +* +*************************************************************************** +* Surface projection parameter +* 0 = No projection +* 1 = Projection +* +IPROJ,I ,1,1,0 +1 +* +*************************************************************************** +* 0 = Previous default adaption (with/without yplus adaption) +* 1 = Default (difference in velocity, density, pressure +* between two nodes) +* 2 = Ratio of total pressures (po/po_inf) +* 3 = Creation of entropy +* 4 = Vortex identification +* +SENSOR,I ,1,1,0 +1 +* +*************************************************************************** +* H-adaption and/or y+ adaption for SENSOR=0 +* 1 = Only h-refinement +* 2 = Only y+ adaption of prismatic layer +* 3 = Both h-refinement and y+ adaption, this is the same as +* alternative 1 for a grid without a prismatic layer +* +ADAPTCASE,I ,1,1,0 +1 +* +*************************************************************************** +* Desired y+ value for the first prismatic cell +* +YPLUS,R ,1,1,0 +1.0 +* +*************************************************************************** +* Threshold value to start refining the mesh : +* 0 = Not used +* 1 = Not used +* 2 = Ratio of total pressures +* 3 = Creation of entropy +* 4 = Reduced velocity +* +THRESHOLD,R ,1,1,0 +0.8 +* +*************************************************************************** +* Adaption box : +* 0. = BOXCOOR defines an hexahedral box +* >0. = Radius of a cylinder whose centerline is given by BOXCOOR +* +* NSIZE for RADIUS gives the number of boxes specified +* +RADIUS,R ,1,1,0 +0.0 +* +*************************************************************************** +* If RADIUS = 0. : Coordinates of two diagonal points in an +* hexahedral box +* If RADIUS > 0. : Coordinates of the two points defining the +* centerline of a cylinder +* Xmin Xmax Ymin Ymax [Zmin Zmax] +* (Xmin=Xmax & Ymin=Ymax & Zmin= Zmax)=>No adaption box +* +BOXCOOR,R ,1,6,0 +0.0 0.0 0.0 0.0 0.0 0.0 +* +*************************************************************************** +* * +* --------------- Adjoint calculation -------------- * +* Notation : * +* We use here pdJ/pdx, respectively, pdJ/pdw, for * +* the partial derivatives of J with respect to the variable x, * +* respectively, w. * +* * +* Context : * +* Compute gradient of J(w,X) subject to E(w,X)=0, * +* where X is the set of nodal coordinates and w the set * +* of nodal values of the vector of conservative variables. * +* J is one of the functionals described by FUNTYP below. * +* Here E symbolizes the discretized flow equations in Edge. * +* The associated discrete adjoint problem is * +* [(dE/dw)prime]z=pdJ/pdwprime * +* where prime is the transpose or adjoint * +* and z is the adjoint state associated with the calculation * +* of the gradient of J with respect to X. * +* * +* Important note : * +* z is computed by Edge as well as * +* a postprocessing, see below ADJOPT. * +* In order to compute the gradient w.r.t. all nodes * +* (if below ADJOPT=2), the edge file is required to * +* contain extra data. This is done by running the preprocessor * +* on the edge input for the adjoint case with ADJOPT=2. * +* * +*************************************************************************** +* 0 = Flow solution +* 1 = Calculate/save adjoint solution (z) only in CFIOUT (*.bout file) +* 2 = ----------------------------------- and gradient (dJ/dX) in output +* Requires a flow solution CFIEUL (*.bout file). +* +ADJOPT,I ,1,1,0 +0 +* +*************************************************************************** +* The solution file for the current flow (w, see above), (.****) +* +CFIEUL,L ,1,1,0 +'Edge.bout ' +* +*************************************************************************** +* Description of objective function +* I - INVISCID AERODYNAMIC COEFFICIENTS +* Note : direction vectors are normalized at initialization +* and the integrated forces are non-dimensionalized +* by division by free-stream energy +* drag : pressure force on part of the wall boundaries +* projected in the direction IDCDP +* lift : pressure force on part of the wall boundaries +* projected in the direction IDCLP +* side : pressure force on part of the wall boundaries +* projected in the direction IDCCP +* pitch: pressure moment on part of the wall boundaries +* projected in the direction IDCMP +* yaw : pressure moment on part of the wall boundaries +* projected in the direction IDCNP +* roll : pressure moment on part of the wall boundaries +* projected in the direction IDCRP +* II - NATURAL LAMINAR FLOW DESIGN +* blsa : J=J(p(X)) where J is computed by external programs +* for the boundary layer analysis and the +* propagation of disturbances. +* Requires the file CFIBLAD (FFA-format) where +* subsets GRADP, GRADX, GRADY give pdJ/pdp_i, +* pdJ/pdx_i, pdJ/pdy_i and a subset +* BNOD gives the global index i of the nodes +* i at which the pressure p_i is used in the +* coupling between the flow solver (Edge) and +* the analysis of the boundary layer. +* +FUNTYP,L ,1,1,0 +'lift ' +* +CFIBLAD,L ,1,1,0 +'databl.adbl ' +* +*************************************************************************** +* * +* --------------- Probe analysis options --------------- * +* * +* Records primitive variables and turbulence data at a * +* specified point in the volume or on a boundary * +* * +*************************************************************************** +* Probe data history on/off (IPROBEHIS=1/0) +* Probe input data file under CFIPRB +* +IPROBEHIS,I ,1,1,0 +0 +* +*************************************************************************** +* * +* --------------- Sampling surface options ------------- * +* * +*************************************************************************** +* Aerodynamic coeff history on/off (IACHIS=1/0) +* Aerodynamic coeff history input file name supplied to CFIACI +* +IACHIS,I ,1,1,0 +0 +* +*************************************************************************** +* Sampling boundary data on/off (ISAMP=1/0) +* Sampling boundary data input file name supplied to CFIBSI +* +ISAMP,I ,1,1,0 +0 +* +*************************************************************************** +* Sampling on supplied mesh (ISAMMSH=1) +* Sampling mesh file name supplied to CFISAMMSH +* +ISAMMSH,I ,1,1,0 +0 +* +*************************************************************************** +* * +* --------------- Inlet analysis options --------------- * +* * +*************************************************************************** +* Inlet analysis option on/off (IAIPHIS=1/0) +* Inlet analysis input data file under CFIAIP +* +IAIPHIS,I ,1,1,0 +0 +* diff --git a/ceasiompy/EdgeRun/files/queue_template.script b/ceasiompy/EdgeRun/files/queue_template.script new file mode 100755 index 000000000..c61c2935b --- /dev/null +++ b/ceasiompy/EdgeRun/files/queue_template.script @@ -0,0 +1,15 @@ +#!/bin/sh +#SBATCH -t 1:0:0 +#SBATCH -n 1 +#SBATCH -p main +#SBATCH -A naiss2023-22-818 +#SBATCH -c 1 +#SBATCH -J jobname +# +# slurm file submitted to cluster +# -t - time limit for jobs +# -N - number of nodes (not cores, use -n for cores) +# -A - project name/number +# -C - specific node required +# -J - name of job for identification in queue +# diff --git a/ceasiompy/EdgeRun/func/edge_que_script_gen.py b/ceasiompy/EdgeRun/func/edge_que_script_gen.py new file mode 100644 index 000000000..08b01a8b6 --- /dev/null +++ b/ceasiompy/EdgeRun/func/edge_que_script_gen.py @@ -0,0 +1,143 @@ +""" +CEASIOMpy: Conceptual Aircraft Design Software + +Developed for Airinnova AB, Stockholm, Sweden + +Functions to generate queuing script for Edge: +queue_preprocessor.script and queue_edgesolver.script + +Python version: >=3.8 + +| Author : Mengmeng Zhang +| Creation: 2024-01-05 +""" + +# ================================================================================================= +# IMPORTS +# ================================================================================================= + +import os +import subprocess +from pathlib import Path + +# ================================================================================================= +# CLASSES +# ================================================================================================= + + +class EdgeScripts: + def __init__(self, dir_path, jobname, input_que_script_path, edge_input_file): + self.jobname = jobname + self.dir_path = dir_path + self.input_que_script_path = input_que_script_path + self.Edge_dir = "/pdc/software/22.06/other/m-edge/3.2/gnu/bin/" + self.EdgeInputFile = edge_input_file + # self.GridDir = 'grid' + # os.chdir(os.path.join(caseDir, self.GridDir)) + + def submit_preprocessor_script(self, dir_path): + preprocessor = os.path.join(self.Edge_dir, "preprocessor") + # dir_path = self.dir_path + QueScript = "queue_preprocessor.script" + Submitcommand = "sbatch" + os.chdir(dir_path) + with open(self.input_que_script_path, "r") as template_file, open( + QueScript, "w" + ) as que_script: + for line in template_file: + if "-J jobname" in line: + line = line.replace("-J jobname", f"-J {self.jobname}prepro") + que_script.write(line) + que_script.write(f"{preprocessor} {self.EdgeInputFile} > edge_preprocessor.log 2>&1\n") + print(f"{preprocessor} {self.EdgeInputFile} > edge_preprocessor.log 2>&1\n") + os.system(f"{Submitcommand} {que_script}") + + def run_preprocessor(self, dir_path): + # preprocessor = os.path.join(self.Edge_dir, 'preprocessor') + # dir_path = self.dir_path + # QueScript = f'queue_preprocessor.script' + # Submitcommand = 'sbatch' + os.chdir(dir_path) + + """ + with open(self.input_que_script_path, 'r') as template_file, + open(QueScript, 'w') as que_script: + for line in template_file: + if '-J jobname' in line: + line = line.replace('-J jobname', f'-J {self.jobname}prepro') + que_script.write(line) + que_script.write(f'{preprocessor} {self.EdgeInputFile} > edge_preprocessor.log 2>&1\n') + print(f'{preprocessor} {self.EdgeInputFile} > edge_preprocessor.log 2>&1\n') + """ + os.system(f"preprocessor {self.EdgeInputFile} > edge_preprocessor.log 2>&1\n") + + def submit_solver_script(self, dir_path, nb_proc): + run_solver = os.path.join(self.Edge_dir, "edge_mpi_run") + QueScript = "queue_edgesolver.script" + # dir_path = self.dir_path + Submitcommand = "sbatch" + os.chdir(dir_path) + with open(self.input_que_script_path, "r") as template_file, open( + QueScript, "w" + ) as que_script: + for line in template_file: + if "-J jobname" in line: + line = line.replace("-J jobname", f"-J {self.jobname}solver") + que_script.write(line) + que_script.write(f"{run_solver} {self.EdgeInputFile} {nb_proc} > edge_run.log 2>&1\n") + os.system(f"{Submitcommand} {que_script}") + + def run_edgesolver(self, dir_path, nb_proc): + run_solver = os.path.join(self.Edge_dir, "edge_mpi_run") + os.chdir(dir_path) + os.system(f"{run_solver} {self.EdgeInputFile} {nb_proc} > edge_run.log 2>&1\n") + + def postprocess_script(self, dir_path, edge_grid): + # ffaucut = os.path.join(self.Edge_dir, 'ffaucut') + # ffauinterpol = os.path.join(self.Edge_dir, 'ffauinterpol') + # ffa2tab = os.path.join(self.Edge_dir, 'ffa2tab') + ffa2engold = os.path.join(self.Edge_dir, "ffa2engold") + grid = edge_grid + + # output file names + # walldata1 = "Edge_wall.dat" + # walldata2 = "Edge_wall.cf" + # forcemoments = "Edge_force_moment.dat" + ensgoldprefix = "zzz" + solution1 = "Edge.bout" + # solution2 = "Post.bout" + + # Enter the folder + os.chdir(dir_path) + + """ + # Extract the boundary + input_data = + 1 + 0 + with subprocess.Popen([ffaucut, grid, 'tmp1'], stdin=subprocess.PIPE, text=True) + as process: + process.communicate(input=input_data) + + + # Inteerpolate the soulutions + subprocess.run([ffauinterpol, solution1, 'tmp1', 'tmp11']) + subprocess.run([ffauinterpol, solution2, 'tmp1', 'tmp12']) + + # Extract tabulated data + subprocess.run([ffa2tab, 'tmp11', walldata1]) + subprocess.run([ffa2tab, 'tmp12', walldata2]) + + # Cleanup + for temp_file in ['tmp1', 'tmp11', 'tmp12']: + os.remove(temp_file) + """ + # Create ensight gold files + subprocess.run([ffa2engold, grid, solution1, ensgoldprefix]) + + # os.system(f'{Submitcommand} {que_script}') + + +# ================================================================================================= +# FUNCTIONS +# ================================================================================================= diff --git a/ceasiompy/EdgeRun/func/edgeconfig.py b/ceasiompy/EdgeRun/func/edgeconfig.py new file mode 100644 index 000000000..661f108b4 --- /dev/null +++ b/ceasiompy/EdgeRun/func/edgeconfig.py @@ -0,0 +1,350 @@ +""" +CEASIOMpy: Conceptual Aircraft Design Software + +Developed by Airinnova AB, Stockholm, Sweden + +Function generate or modify M-Edge ainp files + +Python version: >=3.8 + +| Author: Mengmeng Zhang +| Creation: 2024-01-05 + +TODO: + + * + +""" + +# ================================================================================================= +# IMPORTS +# ================================================================================================= + +import math +import os + +from pathlib import Path +from shutil import copyfile + +from ambiance import Atmosphere + +# from ceasiompy.SU2Run.func.su2actuatordiskfile import ( +# get_advanced_ratio, +# get_radial_stations, +# save_plots, +# thrust_calculator, +# write_actuator_disk_data, +# write_header, +# ) + +# from ceasiompy.EdgeRun.func.edgeutils import get_edge_ainp_template +from ceasiompy.utils.ceasiomlogger import get_logger +from ceasiompy.utils.commonnames import ( + AINP_CFD_NAME, +) +from ceasiompy.utils.commonxpath import ( + GMSH_SYMMETRY_XPATH, + RANGE_XPATH, + EDGE_MESH_XPATH, + EDGE_AEROMAP_UID_XPATH, + EDGE_SOLVER_XPATH, + EDGE_CFL_NB_XPATH, + EDGE_MAX_ITER_XPATH, + EDGE_MG_LEVEL_XPATH, + EDGE_NB_CPU_XPATH, + EDGE_FIXED_CL_XPATH, + EDGE_ABOC_XPATH, +) + +# from ceasiompy.utils.configfiles import ConfigFile +from ceasiompy.utils.create_ainpfile import CreateAinp +from cpacspy.cpacsfunctions import ( + get_value, + get_value_or_default, +) +from cpacspy.cpacspy import CPACS +from ceasiompy.EdgeRun.func.edgeutils import get_edge_que_script_template +from ceasiompy.EdgeRun.func.edge_que_script_gen import EdgeScripts + +# import cpacs + +log = get_logger() + +MODULE_DIR = Path(__file__).parent + +input_que_script_path = get_edge_que_script_template() + + +# ================================================================================================= +# CLASSES +# ================================================================================================= + + +# ================================================================================================= +# FUNCTIONS +# ================================================================================================= + + +def edge_cfd(cpacs_path, cpacs_out_path, wkdir): + # output_path = Path(case_dir_path, AINP_CFD_NAME) + """Function to create Edge input (*.ainp) file. + + Function 'generate_edge_cfd_ainp' reads data in the CPACS file and generate configuration + files for one or multiple flight conditions (alt,mach,aoa,aos) + + Source: + * M-Edge ainp template: + + Args: + cpacs_path (Path): Path to CPACS file + cpacs_out_path (Path):Path to CPACS output file + wkdir (Path): Path to the working directory + + """ + + cpacs = CPACS(cpacs_path) + + edge_mesh = Path(get_value(cpacs.tixi, EDGE_MESH_XPATH)) + # edge_aboc = edge_mesh.with_suffix(".aboc") + edge_aboc = Path( + get_value_or_default(cpacs.tixi, EDGE_ABOC_XPATH, edge_mesh.with_suffix(".aboc")) + ) + + if not edge_mesh.is_file(): + raise FileNotFoundError(f"M-Edge mesh file {edge_mesh} not found") + # copy edge_mesh and edge_aboc file to the Working directory + + grid_folder = Path(wkdir, "grid") + # grid_folder = Path(wkdir) # Added by Mengmeng Zhang + to_grid = grid_folder / edge_mesh.name + to_aboc = grid_folder / edge_aboc.name + + if not os.path.exists(grid_folder): + os.makedirs(grid_folder) + copyfile(edge_mesh, to_grid) + copyfile(edge_aboc, to_aboc) + + # Get the fixedCL value from CPACS + fixed_cl = get_value_or_default(cpacs.tixi, EDGE_FIXED_CL_XPATH, "NO") + if fixed_cl == "NO": + # Get the first aeroMap as default one or create automatically one + aeromap_list = cpacs.get_aeromap_uid_list() + + if aeromap_list: + aeromap_default = aeromap_list[0] + log.info(f"The aeromap is {aeromap_default}") + + aeromap_uid = get_value_or_default(cpacs.tixi, EDGE_AEROMAP_UID_XPATH, aeromap_default) + + activate_aeromap = cpacs.get_aeromap_by_uid(aeromap_uid) + alt_list = activate_aeromap.get("altitude").tolist() + mach_list = activate_aeromap.get("machNumber").tolist() + aoa_list = activate_aeromap.get("angleOfAttack").tolist() + aos_list = activate_aeromap.get("angleOfSideslip").tolist() + + else: + default_aeromap = cpacs.create_aeromap("DefaultAeromap") + default_aeromap.description = "AeroMap created automatically" + + mach = get_value_or_default(cpacs.tixi, RANGE_XPATH + "/cruiseMach", 0.3) + alt = get_value_or_default(cpacs.tixi, RANGE_XPATH + "/cruiseAltitude", 10000) + + default_aeromap.add_row(alt=alt, mach=mach, aos=0.0, aoa=0.0) + default_aeromap.save() + + alt_list = [alt] + mach_list = [mach] + aoa_list = [0.0] + aos_list = [0.0] + + aeromap_uid = get_value_or_default( + cpacs.tixi, EDGE_AEROMAP_UID_XPATH, "DefaultAeromap" + ) + log.info(f"{aeromap_uid} has been created") + + else: # if fixed_cl == 'YES': + log.info("Configuration file for fixed CL calculation will be created.") + + fixed_cl_aeromap = cpacs.create_aeromap("aeroMap_fixedCL_SU2") + # fixed_cl_aeromap.description = f"AeroMap created for SU2 fixed CL value of {target_cl}" + + mach = get_value_or_default(cpacs.tixi, RANGE_XPATH + "/cruiseMach", 0.78) + alt = get_value_or_default(cpacs.tixi, RANGE_XPATH + "/cruiseAltitude", 12000) + + fixed_cl_aeromap.add_row(alt=alt, mach=mach, aos=0.0, aoa=0.0) + fixed_cl_aeromap.save() + + alt_list = [alt] + mach_list = [mach] + aoa_list = [0.0] + aos_list = [0.0] + + # cfg = ConfigFile(get_su2_config_template()) + + # Check if symmetry plane is defined (Default: False) + sym_factor = 1.0 + if get_value_or_default(cpacs.tixi, GMSH_SYMMETRY_XPATH, False): + log.info("Symmetry plane is defined. The reference area will be divided by 2.") + sym_factor = 2.0 + + # General parameters + # + BMSH = edge_mesh.name + ABOC = edge_aboc.name + CREF = cpacs.aircraft.ref_length + SREF = cpacs.aircraft.ref_area / sym_factor + BREF = SREF / CREF + IXMP = [cpacs.aircraft.ref_point_x, cpacs.aircraft.ref_point_y, cpacs.aircraft.ref_point_z] + + # Settings + + ITMAX = int(get_value_or_default(cpacs.tixi, EDGE_MAX_ITER_XPATH, 1000)) + CFL = get_value_or_default(cpacs.tixi, EDGE_CFL_NB_XPATH, 1.5) + NGRID = int(get_value_or_default(cpacs.tixi, EDGE_MG_LEVEL_XPATH, 1)) + NPART = int(get_value_or_default(cpacs.tixi, EDGE_NB_CPU_XPATH, 128)) + + edge_solver = get_value_or_default(cpacs.tixi, EDGE_SOLVER_XPATH, "Euler") + if edge_solver == "Euler": + INSEUL = 0 + elif edge_solver == "RANS": + INSEUL = 1 + else: + raise Exception("Error, edge solver not assigned") + + # Parameters which will vary for the different cases (alt,mach,aoa,aos) + for case_nb in range(len(alt_list)): + # cfg["MESH_FILENAME"] = str(su2_mesh) + + alt = alt_list[case_nb] + mach = mach_list[case_nb] + aoa = aoa_list[case_nb] + aos = aos_list[case_nb] + + Atm = Atmosphere(alt) + + PFREE = Atm.pressure[0] + TFREE = Atm.temperature[0] + speedofsound = Atm.speed_of_sound[0] + airspeed = mach * speedofsound + + aoa_rad = math.radians(aoa) + aos_rad = math.radians(aos) + + UFREE = airspeed * math.cos(aos_rad) * math.cos(aoa_rad) + WFREE = airspeed * math.cos(aos_rad) * math.sin(aoa_rad) + VFREE = airspeed * math.sin(aos_rad) * (-1) + + IDCDP1 = math.cos(aos_rad) * math.cos(aoa_rad) + IDCDP2 = math.sin(aos_rad) + IDCDP3 = math.cos(aos_rad) * math.sin(aoa_rad) + + IDCLP1 = math.sin(aoa_rad) * (-1) + IDCLP2 = 0 + IDCLP3 = math.cos(aoa_rad) + + IDCCP1 = math.cos(aoa_rad) * math.sin(aos_rad) * (-1) + IDCCP2 = math.cos(aos_rad) * (-1) + IDCCP3 = math.sin(aoa_rad) * math.sin(aos_rad) * (-1) + IDCMP1 = IDCCP1 + IDCMP2 = IDCCP2 + IDCMP3 = IDCCP3 + IDCNP1 = IDCLP1 + IDCNP2 = IDCLP2 + IDCNP3 = IDCLP3 + IDCRP1 = IDCDP1 + IDCRP2 = IDCDP2 + IDCRP3 = IDCDP3 + + IDCLP = f"{IDCLP1} {IDCLP2} {IDCLP3}" + IDCDP = f"{IDCDP1} {IDCDP2} {IDCDP3}" + IDCMP = f"{IDCMP1} {IDCMP2} {IDCMP3}" + IDCCP = f"{IDCCP1} {IDCCP2} {IDCCP3}" + IDCNP = f"{IDCNP1} {IDCNP2} {IDCNP3}" + IDCRP = f"{IDCRP1} {IDCRP2} {IDCRP3}" + + case_dir_name = ( + f"Case{str(case_nb).zfill(2)}_alt{alt}_mach{round(mach, 2)}" + f"_aoa{round(aoa, 1)}_aos{round(aos, 1)}" + ) + + case_dir_path = Path(wkdir, case_dir_name) + if not case_dir_path.exists(): + case_dir_path.mkdir() + output_file_withpath = Path(case_dir_path, AINP_CFD_NAME) + # template_path = get_edge_ainp_template() + create_ainp_instance = CreateAinp() + # create_ainp_instance = CreateAinp(get_edge_ainp_template()) + + create_ainp_instance.create_ainp( + BMSH, + ABOC, + UFREE, + VFREE, + WFREE, + TFREE, + PFREE, + SREF, + CREF, + BREF, + IXMP, + IDCLP, + IDCDP, + IDCCP, + IDCMP, + IDCNP, + IDCRP, + NPART, + ITMAX, + INSEUL, + NGRID, + CFL, + output_file_withpath, + ) + + # cfg.write_file(config_output_path, overwrite=True) + # create and submit the edge-run scripts + # run / submit edge commands + + jobname = case_dir_name + edge_scripts_instance = EdgeScripts( + jobname, case_dir_path, input_que_script_path, AINP_CFD_NAME + ) + + bedg_files_exist = True + for i in range(1, NPART + 1): + bedg_file_path = Path(case_dir_path, grid_folder, f"Edge.bedg_p{i}") + if not bedg_file_path.exists(): + bedg_files_exist = False + break + + if not bedg_files_exist: + # edge_scripts_instance.submit_preprocessor_script(case_dir_path) + log.info("Running Edge preprocessor ...") + print("Running Edge preprocessor ...") + edge_scripts_instance.run_preprocessor(case_dir_path) + log.info("Preprocessor is done. *.bedg files are generated") + print("Preprocessor is done. *.bedg files are generated") + + # edge_scripts_instance.submit_solver_script(case_dir_path,NPART) + log.info("Running Edge solver... for " + case_dir_name) + print("Running Edge solver... for " + case_dir_name) + edge_scripts_instance.run_edgesolver(case_dir_path, NPART) + log.info("Edge solver is done.") + print("Edge solver is done.") + + # postprocess for results + log.info("Running Edge postprocessor...for " + case_dir_name) + print("Running Edge postprocessor...for " + case_dir_name) + edge_scripts_instance.postprocess_script(case_dir_path, edge_mesh) + log.info("Edge postprocessor is done.") + print("Edge postprocessor is done.") + # wait until the results are generated + + cpacs.save_cpacs(cpacs_out_path, overwrite=True) + + # ================================================================================================= + # MAIN + # ================================================================================================= + + if __name__ == "__main__": + log.info("Nothing to execute!") diff --git a/ceasiompy/EdgeRun/func/edgeutils.py b/ceasiompy/EdgeRun/func/edgeutils.py new file mode 100644 index 000000000..75f75efd4 --- /dev/null +++ b/ceasiompy/EdgeRun/func/edgeutils.py @@ -0,0 +1,111 @@ +""" +CEASIOMpy: Conceptual Aircraft Design Software + +Developed for Airinnova AB, Stockholm, Sweden + +Functions to manipulate Edge input file and results (TO-DO) + +Python version: >=3.8 + +| Author : Mengmeng Zhang +| Creation: 2024-01-05 + +TODO: + +""" + +# ================================================================================================= +# IMPORTS +# ================================================================================================= + +import re +from pathlib import Path + +import requests +from ceasiompy.utils.ceasiomlogger import get_logger + +from ceasiompy.utils.moduleinterfaces import get_module_path + +log = get_logger() + + +# ================================================================================================= +# CLASSES +# ================================================================================================= + + +# ================================================================================================= +# FUNCTIONS +# ================================================================================================= + + +def get_edge_ainp_template(): + """Return path of the M-Edge ainp template corresponding to the M-Edge version.""" + + # su2_version = get_su2_version() + edge_dir = get_module_path("EdgeRun") + edge_ainp_template_path = Path(edge_dir, "files", "default.ainp.tmp") + if not edge_ainp_template_path.is_file(): + raise FileNotFoundError( + f"The M-Edge ainp template '{edge_ainp_template_path}' has not been found!" + ) + return edge_ainp_template_path + + +def get_edge_que_script_template(): + """Return path of the M-Edge ainp template corresponding to the M-Edge version.""" + + edge_dir = get_module_path("EdgeRun") + edge_queScript_template_path = Path(edge_dir, "files", "queue_template.script") + if not edge_queScript_template_path.is_file(): + raise FileNotFoundError( + f"The M-Edge queueScript template '{edge_queScript_template_path}' has not been found!" + ) + return edge_queScript_template_path + + +"""""" + + +def get_su2_aerocoefs(force_file): + """Get aerodynamic coefficients and velocity from SU2 forces file (forces_breakdown.dat) + + Args: + force_file (Path): Path to the SU2 forces file + + Returns: + cl, cd, cs, cmd, cms, cml, velocity: Aerodynamic coefficients and velocity + """ + + if not force_file.is_file(): + raise FileNotFoundError(f"The SU2 forces file '{force_file}' has not been found!") + + cl, cd, cs, cmd, cms, cml, velocity = None, None, None, None, None, None, None + + with open(force_file) as f: + for line in f.readlines(): + if "Total CL:" in line: + cl = float(line.split(":")[1].split("|")[0]) + if "Total CD:" in line: + cd = float(line.split(":")[1].split("|")[0]) + if "Total CSF:" in line: + cs = float(line.split(":")[1].split("|")[0]) + # TODO: Check which axis name correspond to that: cml, cmd, cms + if "Total CMx:" in line: + cmd = float(line.split(":")[1].split("|")[0]) + if "Total CMy:" in line: + cms = float(line.split(":")[1].split("|")[0]) + if "Total CMz:" in line: + cml = float(line.split(":")[1].split("|")[0]) + if "Free-stream velocity" in line and "m/s" in line: + velocity = float(line.split(" ")[7]) + + return cl, cd, cs, cmd, cms, cml, velocity + + +# ================================================================================================= +# MAIN +# ================================================================================================= + +if __name__ == "__main__": + print("Nothing to execute!") diff --git a/ceasiompy/EdgeRun/tests/test_edgerun.py b/ceasiompy/EdgeRun/tests/test_edgerun.py new file mode 100644 index 000000000..7a818f671 --- /dev/null +++ b/ceasiompy/EdgeRun/tests/test_edgerun.py @@ -0,0 +1,69 @@ +""" +CEASIOMpy: Conceptual Aircraft Design Software + +Developed by Airinnova AB, Stockholm, Sweden + +Test functions of 'ceasiompy/EdgeRun/func/edgeconfig.py' + +Python version: >=3.8 + + +| Author : Mengmeng Zhang +| Creation: 2024-01-05 + +""" + +# ================================================================================================= +# IMPORTS +# ================================================================================================= + +import unittest + +import sys +from pathlib import Path + +# Add the ceasiompy module to the PYTHONPATH +# ceasiompy_path = Path("/home/mengmeng/Documents/CEASIOMpy23/CEASIOMpy/ceasiompy") +# sys.path.append(str(ceasiompy_path)) + +# Now you can import and use the ceasiompy module +# import ceasiompy +from ceasiompy.EdgeRun.func.edgeconfig import generate_edge_cfd_ainp +import os + +# from ceasiompy.utils.create_ainpfile import CreateAinp + +MODULE_DIR = Path(__file__).parent + +# ================================================================================================= +# CLASSES +# ================================================================================================= + + +class TestEdgeConfig(unittest.TestCase): + """Test class for 'ceasiompy/EdgeRun/func/edgerun.py'""" + + def test_generate_edge_cfd_ainp(self): + """Test function for 'ceasiompy.EdgeRun.func.edgeconfig.py'.""" + # cpacs_in_path = Path(MODULE_DIR / "ToolInput" / "ToolInput.xml") + cpacs_in_path = Path( + "/home/mengmeng/Documents/CEASIOMpy23/CEASIOMpy/WKDIR/labARstraight_toolInput.xml" + ) + cpacs_out_path = MODULE_DIR / "ToolOutput.xml" + wkdir = MODULE_DIR / "Results/Edge" + + if not os.path.exists(wkdir): + os.makedirs(wkdir) + + generate_edge_cfd_ainp(cpacs_in_path, cpacs_out_path, wkdir) + + +# ================================================================================================= +# MAIN +# ================================================================================================= +""" +if __name__ == "__main__": + print("Test configfile.py") + print("To run test use the following command:") + print(">> pytest -v") +""" diff --git a/ceasiompy/EdgeRun/tests/test_edgerun_mpi.py b/ceasiompy/EdgeRun/tests/test_edgerun_mpi.py new file mode 100644 index 000000000..fba4ad3e9 --- /dev/null +++ b/ceasiompy/EdgeRun/tests/test_edgerun_mpi.py @@ -0,0 +1,71 @@ +""" +CEASIOMpy: Conceptual Aircraft Design Software + +Developed by Airinnova AB, Stockholm, Sweden + +Test functions of 'ceasiompy/EdgeRun/func/edgeconfig.py' + +Python version: >=3.8 + + +| Author : Mengmeng Zhang +| Creation: 2024-01-05 + +""" + +# ================================================================================================= +# IMPORTS +# ================================================================================================= + +import unittest + +from pathlib import Path + +# Add the ceasiompy module to the PYTHONPATH +# ceasiompy_path = Path("/home/mengmeng/Documents/CEASIOMpy23/CEASIOMpy/ceasiompy") +# sys.path.append(str(ceasiompy_path)) + +# Now you can import and use the ceasiompy module +# import ceasiompy +from ceasiompy.EdgeRun.func.edgeconfig import generate_edge_cfd_ainp +import os + +# from ceasiompy.utils.create_ainpfile import CreateAinp + +MODULE_DIR = Path(__file__).parent + +# input_que_script_path = get_edge_queScript_template() + +# ================================================================================================= +# CLASSES +# ================================================================================================= + + +class TestEdgeConfig(unittest.TestCase): + """Test class for 'ceasiompy/EdgeRun/func/edgerun.py'""" + + def test_run_edge_cfd(self): + # cpacs_in_path = Path(MODULE_DIR / "ToolInput" / "ToolInput.xml") + cpacs_in_path = Path( + "/home/mengmeng/Documents/CEASIOMpy23/CEASIOMpy/WKDIR/labARstraight_toolInput.xml" + ) + + cpacs_out_path = MODULE_DIR / "ToolOutput.xml" + wkdir = MODULE_DIR / "Results/Edge" + + if not os.path.exists(wkdir): + os.makedirs(wkdir) + + generate_edge_cfd_ainp(cpacs_in_path, cpacs_out_path, wkdir) + # run_edge_multi(wkdir,input_que_script_path ) + + +# ================================================================================================= +# MAIN +# ================================================================================================= +""" +if __name__ == "__main__": + print("Test configfile.py") + print("To run test use the following command:") + print(">> pytest -v") +""" diff --git a/ceasiompy/EdgeRun/tests/test_edgerun_submit.py b/ceasiompy/EdgeRun/tests/test_edgerun_submit.py new file mode 100644 index 000000000..75a9d9208 --- /dev/null +++ b/ceasiompy/EdgeRun/tests/test_edgerun_submit.py @@ -0,0 +1,48 @@ +""" +CEASIOMpy: Conceptual Aircraft Design Software + +Developed by Airinnova AB, Stockholm, Sweden + +Test functions of 'ceasiompy/EdgeRun/func/edgeconfig.py' + +Python version: >=3.8 + + +| Author : Mengmeng Zhang +| Creation: 2024-01-05 + +""" + +# ================================================================================================= +# IMPORTS +# ================================================================================================= + +from pathlib import Path + +# Add the ceasiompy module to the PYTHONPATH +# ceasiompy_path = Path("/home/mengmeng/Documents/CEASIOMpy23/CEASIOMpy/ceasiompy") +# sys.path.append(str(ceasiompy_path)) + +# Now you can import and use the ceasiompy module +# import ceasiompy +from ceasiompy.EdgeRun.func.edgeconfig import edge_cfd +import os + +# from ceasiompy.EdgeRun.func.edgeutils import get_edge_que_script_template +# from ceasiompy.utils.create_ainpfile import CreateAinp + +MODULE_DIR = Path(__file__).parent +# input_que_script_path = get_edge_que_script_template() + +# cpacs_in_path = Path(MODULE_DIR / "ToolInput" / "ToolInput.xml") +cpacs_in_path = Path( + "/home/mengmeng/Documents/CEASIOMpy23/CEASIOMpy/WKDIR/CPACS_selected_from_GUI.xml" +) +cpacs_out_path = MODULE_DIR / "ToolOutput.xml" +wkdir = MODULE_DIR / "Results" + + +if not os.path.exists(wkdir): + os.makedirs(wkdir) + +edge_cfd(cpacs_in_path, cpacs_out_path, wkdir) diff --git a/ceasiompy/SUMOAutoMesh/__specs__.py b/ceasiompy/SUMOAutoMesh/__specs__.py index 407eab0d2..d6421d079 100644 --- a/ceasiompy/SUMOAutoMesh/__specs__.py +++ b/ceasiompy/SUMOAutoMesh/__specs__.py @@ -1,6 +1,11 @@ from pathlib import Path -from ceasiompy.utils.commonxpath import SU2MESH_XPATH, SUMO_REFINE_LEVEL_XPATH, SUMOFILE_XPATH +from ceasiompy.utils.commonxpath import ( + SU2MESH_XPATH, + SUMO_REFINE_LEVEL_XPATH, + SUMOFILE_XPATH, + SUMO_OUTPUT_MESH_FORMAT_XPATH, +) from ceasiompy.utils.moduleinterfaces import CPACSInOut # ===== Module Status ===== @@ -43,6 +48,18 @@ gui_group="SUMO options", ) +cpacs_inout.add_input( + var_name="output_format", + var_type=list, + default_value=["su2", "edge"], + unit="1", + descr="chose the output mesh format", + xpath=SUMO_OUTPUT_MESH_FORMAT_XPATH, + gui=True, + gui_name="Output mesh format", + gui_group="SUMO options", +) + # ----- Output ----- diff --git a/ceasiompy/SUMOAutoMesh/sumoautomesh.py b/ceasiompy/SUMOAutoMesh/sumoautomesh.py index 964d7846f..a356ce7ee 100644 --- a/ceasiompy/SUMOAutoMesh/sumoautomesh.py +++ b/ceasiompy/SUMOAutoMesh/sumoautomesh.py @@ -29,7 +29,14 @@ from ceasiompy.utils.ceasiomlogger import get_logger from ceasiompy.utils.ceasiompyutils import aircraft_name, get_results_directory, run_software -from ceasiompy.utils.commonxpath import SU2MESH_XPATH, SUMO_REFINE_LEVEL_XPATH, SUMOFILE_XPATH +from ceasiompy.utils.commonxpath import ( + SU2MESH_XPATH, + SUMO_REFINE_LEVEL_XPATH, + SUMOFILE_XPATH, + SUMO_OUTPUT_MESH_FORMAT_XPATH, + EDGE_MESH_XPATH, + EDGE_ABOC_XPATH, +) from ceasiompy.utils.moduleinterfaces import get_toolinput_file_path, get_tooloutput_file_path from cpacspy.cpacsfunctions import create_branch, get_value_or_default, open_tixi @@ -112,7 +119,7 @@ def add_mesh_parameters(sumo_file_path, refine_level=0.0): REFINE_RATIO = 0.6 # to get approx. double mesh cell when +1 on "refine_level" refine_factor = REFINE_RATIO**refine_level - log.info("Refinement factor is {}".format(refine_factor)) + log.info(f"Refinement factor is {refine_factor:.3f}") # Open SUMO (.smx) with tixi library sumo = open_tixi(sumo_file_path) @@ -209,7 +216,7 @@ def add_mesh_parameters(sumo_file_path, refine_level=0.0): sumo.save(str(sumo_file_path)) -def create_SU2_mesh(cpacs_path, cpacs_out_path): +def create_mesh(cpacs_path, cpacs_out_path): """Function to create a simple SU2 mesh form an SUMO file (.smx) Function 'create_mesh' is used to generate an unstructured mesh with SUMO @@ -228,8 +235,19 @@ def create_SU2_mesh(cpacs_path, cpacs_out_path): tixi = open_tixi(cpacs_path) + output = get_value_or_default(tixi, SUMO_OUTPUT_MESH_FORMAT_XPATH, "su2") + + if output == "su2": + file_extension = "su2" + elif output == "edge": + file_extension = "bmsh" + else: + raise ValueError("Unsupported output format. Use 'su2' or 'edge'") + + log.info(f"The output mesh format is {file_extension}") + sumo_results_dir = get_results_directory("SUMOAutoMesh") - su2_mesh_path = Path(sumo_results_dir, "ToolOutput.su2") + mesh_path = Path(sumo_results_dir, f"ToolOutput.{file_extension}") sumo_file_path = Path(get_value_or_default(tixi, SUMOFILE_XPATH, "")) if not sumo_file_path.exists(): @@ -241,7 +259,7 @@ def create_SU2_mesh(cpacs_path, cpacs_out_path): add_mesh_parameters(sumo_file_path, refine_level) # Tetgen option, see the help for more options - output = "su2" + # output = "su2" options = "pq1.16VY" arguments = [ "-batch", @@ -284,17 +302,33 @@ def create_SU2_mesh(cpacs_path, cpacs_out_path): raise OSError("OS not recognize!") # Copy the mesh in the MESH directory - su2_mesh_name = aircraft_name(tixi) + "_baseline.su2" - su2_mesh_out_path = Path(sumo_results_dir, su2_mesh_name) - shutil.copyfile(su2_mesh_path, su2_mesh_out_path) + mesh_name = aircraft_name(tixi) + f"_baseline.{file_extension}" + mesh_out_path = Path(sumo_results_dir, mesh_name) + shutil.copyfile(mesh_path, mesh_out_path) + + if not mesh_out_path.exists(): + raise ValueError("No mesh file has been generated!") + + log.info(f"A {output} mesh has been correctly generated.") - if not su2_mesh_out_path.exists(): - raise ValueError("No SU2 Mesh file has been generated!") + if output == "su2": + create_branch(tixi, SU2MESH_XPATH) + tixi.updateTextElement(SU2MESH_XPATH, str(mesh_out_path)) + mesh_path.unlink() - log.info("An SU2 Mesh has been correctly generated.") - create_branch(tixi, SU2MESH_XPATH) - tixi.updateTextElement(SU2MESH_XPATH, str(su2_mesh_out_path)) - su2_mesh_path.unlink() + elif output == "edge": + create_branch(tixi, EDGE_MESH_XPATH) + tixi.updateTextElement(EDGE_MESH_XPATH, str(mesh_out_path)) + + edge_aboc_path = Path(sumo_results_dir, "ToolOutput.aboc") # commented by Mengmeng + edge_aboc_name = aircraft_name(tixi) + "_baseline.aboc" + aboc_out_path = Path(sumo_results_dir, edge_aboc_name) + shutil.copyfile(edge_aboc_path, aboc_out_path) + + create_branch(tixi, EDGE_ABOC_XPATH) + tixi.updateTextElement(EDGE_ABOC_XPATH, str(aboc_out_path)) + + mesh_path.unlink() tixi.save(str(cpacs_out_path)) @@ -305,16 +339,15 @@ def create_SU2_mesh(cpacs_path, cpacs_out_path): def main(cpacs_path, cpacs_out_path): - log.info("----- Start of " + MODULE_NAME + " -----") - create_SU2_mesh(cpacs_path, cpacs_out_path) + # Call create_mesh with the desired output format + create_mesh(cpacs_path, cpacs_out_path) log.info("----- End of " + MODULE_NAME + " -----") if __name__ == "__main__": - cpacs_path = get_toolinput_file_path(MODULE_NAME) cpacs_out_path = get_tooloutput_file_path(MODULE_NAME) diff --git a/ceasiompy/utils/ceasiomlogger.py b/ceasiompy/utils/ceasiomlogger.py index 971f0c35b..10329aa99 100644 --- a/ceasiompy/utils/ceasiomlogger.py +++ b/ceasiompy/utils/ceasiomlogger.py @@ -42,6 +42,7 @@ def get_logger(): logger (logger): Logger """ + logger = logging.getLogger("CEASIOMpy") # NOTE: Multiple calls to getLogger() with the same name will return a @@ -53,33 +54,32 @@ def get_logger(): logger.setLevel(logging.DEBUG) # Write logfile - file_formatter = logging.Formatter("%(asctime)s - %(levelname)8s - %(module)18s - %(message)s") - file_handler = logging.FileHandler(filename=LOGFILE, mode="w") - file_handler.setLevel(logging.DEBUG) # Level for the logfile - file_handler.setFormatter(file_formatter) - logger.addHandler(file_handler) + #file_formatter = logging.Formatter("%(asctime)s - %(levelname)8s - %(module)18s - %(message)s") + #file_handler = logging.FileHandler(filename=LOGFILE, mode="w") + #file_handler.setLevel(logging.DEBUG) # Level for the logfile + #file_handler.setFormatter(file_formatter) + #logger.addHandler(file_handler) # Write log messages on the console - console_formatter = logging.Formatter("%(levelname)-8s - %(message)s") - console_handler = logging.StreamHandler() - console_handler.setLevel(logging.DEBUG) # Level for the console log - console_handler.setFormatter(console_formatter) - logger.addHandler(console_handler) - + #console_formatter = logging.Formatter("%(levelname)-8s - %(message)s") + #console_handler = logging.StreamHandler() + #console_handler.setLevel(logging.DEBUG) # Level for the console log + #console_handler.setFormatter(console_formatter) + #logger.addHandler(console_handler) return logger def add_to_runworkflow_history(working_dir: Path, comment: str = "") -> None: """Add a line to the runworkflow history""" - RUNWORKFLOW_HISTORY_PATH.parent.mkdir(exist_ok=True) - RUNWORKFLOW_HISTORY_PATH.touch(exist_ok=True) + #RUNWORKFLOW_HISTORY_PATH.parent.mkdir(exist_ok=True) + #RUNWORKFLOW_HISTORY_PATH.touch(exist_ok=True) if comment: comment = " - " + comment - with open(RUNWORKFLOW_HISTORY_PATH, "a") as f: - f.write(f"{datetime.now():%Y-%m-%d %H:%M:%S} - {working_dir}{comment}\n") + #with open(RUNWORKFLOW_HISTORY_PATH, "a") as f: + # f.write(f"{datetime.now():%Y-%m-%d %H:%M:%S} - {working_dir}{comment}\n") def get_last_runworkflow() -> Path: @@ -102,5 +102,4 @@ def get_last_runworkflow() -> Path: # ================================================================================================= if __name__ == "__main__": - print("Nothing to execute!") diff --git a/ceasiompy/utils/commonnames.py b/ceasiompy/utils/commonnames.py index 2fcdabd97..1b3f8b704 100644 --- a/ceasiompy/utils/commonnames.py +++ b/ceasiompy/utils/commonnames.py @@ -9,6 +9,7 @@ | Author: Aidan jungo | Creation: 2022-05-13 +| Last modifiction: 2024-01-05 (Mengmeng Zhang, added M-Edge AINP_CFD_NAME ) TODO: @@ -41,5 +42,8 @@ ACTUATOR_DISK_INLET_SUFFIX = "_AD_Inlet" ACTUATOR_DISK_OUTLET_SUFFIX = "_AD_Outlet" +# M-Edge +AINP_CFD_NAME = "Edge.ainp" + # WEIGHT & BALANCE MTOM_FIGURE_NAME = "MTOM_Prediction.png" diff --git a/ceasiompy/utils/commonxpath.py b/ceasiompy/utils/commonxpath.py index 0b9e28a57..28398fd46 100644 --- a/ceasiompy/utils/commonxpath.py +++ b/ceasiompy/utils/commonxpath.py @@ -12,6 +12,7 @@ | Author: Aidan jungo | Creation: 2021-10-21 +| Last modifiction: 2024-01-05 (Mengmeng Zhang, added M-Edge XPATHs ) TODO: @@ -77,6 +78,8 @@ OPTWKDIR_XPATH = CEASIOMPY_XPATH + "/filesPath/optimPath" SMFILE_XPATH = CEASIOMPY_XPATH + "/filesPath/SMpath" SU2MESH_XPATH = CEASIOMPY_XPATH + "/filesPath/su2Mesh" +EDGE_MESH_XPATH = CEASIOMPY_XPATH + "/filesPath/edgeMesh" + SUMOFILE_XPATH = CEASIOMPY_XPATH + "/filesPath/sumoFilePath" WKDIR_XPATH = CEASIOMPY_XPATH + "/filesPath/wkdirPath" @@ -84,6 +87,7 @@ TURBOPROP_XPATH = PROP_XPATH + "/turboprop" # SUMO +SUMO_OUTPUT_MESH_FORMAT_XPATH = MESH_XPATH + "sumoOptions/format" SUMO_REFINE_LEVEL_XPATH = MESH_XPATH + "/sumoOptions/refinementLevel" SUMO_INCLUDE_PYLON_XPATH = CEASIOMPY_XPATH + "/engine/includePylon" SUMO_INCLUDE_ENGINE_XPATH = CEASIOMPY_XPATH + "/engine/includeEngine" @@ -139,6 +143,17 @@ SU2_ACTUATOR_DISK_XPATH = SU2_XPATH + "/options/includeActuatorDisk" +# EDGE +EDGE_XPATH = CEASIOMPY_XPATH + "/aerodynamics/medge" +EDGE_AEROMAP_UID_XPATH = EDGE_XPATH + "/aeroMapUID" +EDGE_NB_CPU_XPATH = EDGE_XPATH + "/settings/nbCPU" +EDGE_SOLVER_XPATH = EDGE_XPATH + "/settings/solver" +EDGE_MAX_ITER_XPATH = EDGE_XPATH + "/settings/maxIter" +EDGE_CFL_NB_XPATH = EDGE_XPATH + "/settings/cflNumber/value" +EDGE_MG_LEVEL_XPATH = EDGE_XPATH + "/settings/multigridLevel" +EDGE_FIXED_CL_XPATH = EDGE_XPATH + "/fixedCL" +EDGE_ABOC_XPATH = EDGE_XPATH + "/boundary_condition" + # RANGE RANGE_LD_RATIO_XPATH = CEASIOMPY_XPATH + "/ranges/lDRatio" diff --git a/ceasiompy/utils/create_ainpfile.py b/ceasiompy/utils/create_ainpfile.py new file mode 100644 index 000000000..c4af0aba6 --- /dev/null +++ b/ceasiompy/utils/create_ainpfile.py @@ -0,0 +1,102 @@ +""" +CEASIOMpy: Conceptual Aircraft Design Software + +Developed by Airinnova AB, Stockholm, Sweden + +Module to run M-Edge Calculation in CEASIOMpy +Create M-Edge ainp file from template + +Python version: >=3.8 + +| Author : Mengmeng Zhang +| Creation: 2024-01-05 + +TODO: + + + +""" + +# ================================================================================================= +# IMPORTS +# ================================================================================================= + +import re +from ceasiompy.EdgeRun.func.edgeutils import get_edge_ainp_template + +# ================================================================================================= +# CLASSES +# ================================================================================================= + + +class CreateAinp: + def __init__(self): + self.template_file = get_edge_ainp_template() + + def _write_file(self, content, output_file_withpath): + # output_file_path = os.path.join(output_folder, 'Edge.ainp') + with open(output_file_withpath, "w") as f: + f.write(content) + + def create_ainp( + self, + BMSH, + ABOC, + UFREE, + VFREE, + WFREE, + TFREE, + PFREE, + SREF, + CREF, + BREF, + IXMP, + IDCLP, + IDCDP, + IDCCP, + IDCMP, + IDCNP, + IDCRP, + NPART, + ITMAX, + INSEUL, + NGRID, + CFL, + output_folder, + ): + # template_file_path = get_edge_ainp_template() + with open(self.template_file, "r") as f: + template_content = f.read() + + # Define a dictionary for keyword-value pairs + replacements = { + "__BMSH__": f"../grid/{BMSH}", + "__ABOC__": f"../grid/{ABOC}", + "__UFREE__": str(UFREE), + "__VFREE__": str(VFREE), + "__WFREE__": str(WFREE), + "__TFREE__": str(TFREE), + "__PFREE__": str(PFREE), + "__SREF__": str(SREF), + "__CREF__": str(CREF), + "__BREF__": str(BREF), + "__IXMP__": f"{IXMP[0]} {IXMP[1]} {IXMP[2]}", + "__IDCLP__": IDCLP, + "__IDCDP__": IDCDP, + "__IDCCP__": IDCCP, + "__IDCMP__": IDCMP, + "__IDCNP__": IDCNP, + "__IDCRP__": IDCRP, + "__NPART__": str(NPART), + "__ITMAX__": str(ITMAX), + "__INSEUL__": str(INSEUL), + "__NGRID__": str(NGRID), + "__CFL__": str(CFL), + } + + # Use regular expression to replace keywords with their corresponding values + edge_content = template_content + for keyword, value in replacements.items(): + edge_content = re.sub(re.escape(keyword), value, edge_content) + + self._write_file(edge_content, output_folder) diff --git a/ceasiompy/utils/workflowclasses.py b/ceasiompy/utils/workflowclasses.py index eb2bc2252..fb90c58a2 100644 --- a/ceasiompy/utils/workflowclasses.py +++ b/ceasiompy/utils/workflowclasses.py @@ -43,7 +43,6 @@ class ModuleToRun: def __init__( self, name: str, wkflow_dir: Path, cpacs_in: Path = None, cpacs_out: Path = None ) -> None: - # Check module name validity accepted_names = get_module_list(only_active=False) + OPTIM_METHOD if name not in accepted_names: @@ -69,7 +68,6 @@ def __init__( self.optim_related_modules = [] def create_module_wkflow_dir(self, cnt: int) -> None: - if self.is_optim_module and self.optim_method: module_wkflow_name = str(cnt).rjust(2, "0") + "_" + self.optim_method else: @@ -85,7 +83,6 @@ class OptimSubWorkflow: def __init__( self, subworkflow_dir: Path, cpacs_in: Path, optim_method: str, modules_list: list ) -> None: - self.subworkflow_dir = subworkflow_dir self.cpacs_in = cpacs_in self.optim_method = optim_method @@ -103,7 +100,6 @@ def set_subworkflow(self) -> None: """Set input and output for subworkflow.""" for m, module in enumerate(self.modules): - # Create the module directory in the subworkflow directory with change_working_dir(self.subworkflow_dir): self.modules[m].create_module_wkflow_dir(m + 1) @@ -148,7 +144,6 @@ class Workflow: """Class to define and run CEASIOMpy workflow.""" def __init__(self) -> None: - self.working_dir = Path().cwd() self.cpacs_in = Path(CPACS_FILES_PATH, "D150_simple.xml").resolve() self.current_wkflow_dir = None @@ -158,6 +153,11 @@ def __init__(self) -> None: self.optim_method = None self.module_optim = [] + self.output_format = [] + + def set_output_format(self, output_format: str) -> None: + """Set the mesh extension.""" + self.output_format = output_format def from_config_file(self, cfg_file: Path) -> None: """Get parameters from a config file @@ -202,6 +202,8 @@ def write_config_file(self) -> None: cfg["comment_module_optim"] = "MODULE_OPTIM = ( )" cfg["comment_optim_method"] = "OPTIM_METHOD = NONE" + cfg["MESH_OUTPUT_FORMAT"] = self.output_format + cfg_file = Path(self.working_dir, "ceasiompy.cfg") cfg.write_file(cfg_file, overwrite=True) @@ -255,7 +257,6 @@ def set_workflow(self) -> None: module_optim_idx = None for m, module_name in enumerate(self.modules_list): - # Check if it is the first module (to know where the cpacs input file should come from) if m == 0: cpacs_in = wkflow_cpacs_in @@ -266,6 +267,7 @@ def set_workflow(self) -> None: if self.module_optim[m] == "NO": module = ModuleToRun(module_name, self.current_wkflow_dir, cpacs_in) + module.output_format = self.output_format skip_create_module = False # Check if should be included in Optim/DoE @@ -317,6 +319,10 @@ def run_workflow(self) -> None: # log.info(f" -> {module.name}") for module in self.modules: + if module.name == "SUMOAutomesh": + command_with_output_format = f"{module.name} --output={self.output_format}" + module.name = command_with_output_format + if module.is_optim_module: self.subworkflow.run_subworkflow() else: @@ -342,5 +348,4 @@ def run_workflow(self) -> None: # ================================================================================================= if __name__ == "__main__": - print("Nothing to execute!") diff --git a/src/bin/ceasiompy_exec.py b/src/bin/ceasiompy_exec.py index 66b83ed58..d376cafe7 100755 --- a/src/bin/ceasiompy_exec.py +++ b/src/bin/ceasiompy_exec.py @@ -63,7 +63,6 @@ def run_testcase(testcase_nb): """Run a test case.""" if testcase_nb == 1: - testcase_message(1) test_case_1_path = Path(TEST_CASES_PATH, "test_case_1") @@ -115,9 +114,9 @@ def run_testcase(testcase_nb): def run_modules_list(args_list): """Run a workflow from a CPACS file and a list of modules.""" - if len(args_list) < 2: + if len(args_list) < 3: print( - "\nAt least 2 arguments are required to run a CEASIOMpy, the first onw must be the" + "\nAt least 3 arguments are required to run a CEASIOMpy, the first onw must be the" "CPACS file and the modules to run. You can add as many modules as you want." ) return @@ -134,7 +133,8 @@ def run_modules_list(args_list): print(f"The CPACS file {cpacs_path} does not exist.") return - modules_list = args_list[1:] + output_format = args_list[1] + modules_list = args_list[2:] log.info("CEASIOMpy as been started from a command line") @@ -142,6 +142,7 @@ def run_modules_list(args_list): workflow.cpacs_in = cpacs_path workflow.modules_list = modules_list workflow.module_optim = ["NO"] * len(modules_list) + workflow.output_format = output_format workflow.write_config_file() workflow.set_workflow() @@ -174,13 +175,25 @@ def run_gui(): os.system(f"cd {STREAMLIT_PATH} && streamlit run CEASIOMpy.py") +def run_output(output): + """Chose the format for the output mesh""" + + if output == "su2": + file_extension = "su2" + elif output == "edge": + file_extension = "bmsh" + else: + raise ValueError("Unsupported output format. Use 'su2' or 'edge'") + + log.info(f"The chosen output format is: {file_extension}") + + # ================================================================================================= # MAIN # ================================================================================================= def main(): - parser = argparse.ArgumentParser( description="CEASIOMpy: Conceptual Aircraft Design Environment", usage=argparse.SUPPRESS, @@ -215,34 +228,43 @@ def main(): metavar="NB", help="run a test case [1, 2, or 3]", ) + parser.add_argument( + "-o", + "--output", + dest="output", + type=str, + metavar="", + default="su2", + choices=["su2", "cgns", "edge"], + help="chose to generate a mesh for SU2 or m-Edge [su2, cgns, edge]", + ) args = parser.parse_args() if args.testcase: - run_testcase(args.testcase) return if args.modules: - run_modules_list(args.modules) return if args.cfg: - run_config_file(args.cfg) return if args.gui: - run_gui() return + if args.output: + run_output(args.output) + return + # If no argument is given, print the help parser.print_help() if __name__ == "__main__": - main() diff --git a/src/bin/ceasiompy_run.bat b/src/bin/ceasiompy_run.bat index dfd1caa4f..aacd1f415 100644 --- a/src/bin/ceasiompy_run.bat +++ b/src/bin/ceasiompy_run.bat @@ -39,5 +39,4 @@ :: Turn off command echoing feature @echo off - -python ceasiompy_exec.py %* +python3 ceasiompy_exec.py %* diff --git "a/src/streamlit/pages/01_ \342\236\241_Workflow.py" "b/src/streamlit/pages/01_ \342\236\241_Workflow.py" index 27ac8306e..c35fe1d4f 100644 --- "a/src/streamlit/pages/01_ \342\236\241_Workflow.py" +++ "b/src/streamlit/pages/01_ \342\236\241_Workflow.py" @@ -60,13 +60,13 @@ def section_predefined_workflow(): - st.markdown("#### Predefined Workflows") predefine_workflows = [ ["PyTornado", "WeightConventional"], ["CPACS2GMSH", "SU2Run", "SkinFriction"], ["CPACS2SUMO", "SUMOAutoMesh", "SU2Run", "ExportCSV"], + ["CPACS2SUMO", "SUMOAutoMesh", "EdgeRun"], ] for workflow in predefine_workflows: @@ -75,7 +75,6 @@ def section_predefined_workflow(): def section_add_module(): - st.markdown("#### Your workflow") if "workflow_modules" not in st.session_state: @@ -83,7 +82,6 @@ def section_add_module(): if len(st.session_state.workflow_modules): for i, module in enumerate(st.session_state.workflow_modules): - col1, col2, col3, _ = st.columns([6, 1, 1, 5]) with col1: diff --git "a/src/streamlit/pages/02_\342\232\231\357\270\217_Settings.py" "b/src/streamlit/pages/02_\342\232\231\357\270\217_Settings.py" index e9f74ed04..225482556 100644 --- "a/src/streamlit/pages/02_\342\232\231\357\270\217_Settings.py" +++ "b/src/streamlit/pages/02_\342\232\231\357\270\217_Settings.py" @@ -217,7 +217,6 @@ def section_edit_aeromap(): def mesh_file_upload(): st.markdown("#### Upload mesh file") - # Verifica se è stato caricato un file mesh uploaded_mesh = st.file_uploader( "Select a mesh file", key="00_mesh_upload", @@ -225,37 +224,28 @@ def mesh_file_upload(): ) if uploaded_mesh: - # Crea la cartella "mesh" se non esiste mesh_dir = os.path.join(st.session_state.workflow.working_dir, "mesh") os.makedirs(mesh_dir, exist_ok=True) - # Crea un nuovo percorso per il file .su2 nella cartella "mesh" mesh_new_path = os.path.join(mesh_dir, uploaded_mesh.name) print(f"mesh path: {mesh_new_path}") try: - # Scrivi il file nel percorso specificato with open(mesh_new_path, "wb") as f: f.write(uploaded_mesh.getbuffer()) - # Apri il file CPACS cpacs_path = st.session_state.workflow.cpacs_in print(f"cpacs_path: {cpacs_path}") tixi = open_tixi(cpacs_path) - # Definisci la variabile mesh_xpath in base alla tua struttura CPACS mesh_xpath = "/cpacs/toolspecific/CEASIOMpy/filesPath/su2Mesh" - # Verifica se il percorso esiste if not tixi.checkElement(mesh_xpath): - # Se il percorso non esiste, crealo create_branch(tixi, mesh_xpath) if st.button("Add this mesh"): - # Aggiorna il percorso del file SU2 mesh nel documento CPACS tixi.updateTextElement(mesh_xpath, str(mesh_new_path)) - # Salva il file CPACS save_cpacs_file() return mesh_new_path @@ -361,7 +351,6 @@ def add_module_tab(): ) elif name == "pathtype": - # Chiama la funzione mesh_file_upload() e ottieni il percorso del file mesh mesh_path = mesh_file_upload() with st.columns([1, 2])[0]: