Académique Documents
Professionnel Documents
Culture Documents
2012. 10. 18 ( )
utilities,boundaryconditions,functions,etc...
Pre-processing
Mesh generation
BlockMesh SnappyHexMesh
SnappyHexMesh featureline
featurelineextract
featurelineconvert
fluentMeshToFoam[options]<meshfile> Options
Meshfile
Example
fluent3DMeshToFoam
StarCCM+
Plot3d
2D<thickness>,noBlank,scale Plot3dToFoamnoBlankscale0.001test.grd
Example
transformPoints[options] Options
Example
Point,face,cell handling
checkMesh
constant/polyMesh
sets
zones
regions
Point,face,cell handling
setSet
setcommand
action
Point,face,cell handling
setSetexample
Makezonesfromsets
setsToZonesnoFlipMap pointsZones,faceZones,cellZones
Point,face,cell handling
topoSetDictexample
actions ( { name type action source cell1;//anyname cellSet;//pointSet,faceSet new;//add,delete... cylinderToCell;//boxToCell...
latestTime,noZero,time, parallel,region<name>,
system/topoSetdict
Mesh handling
mergeMeshes
mergeMeshes<mastercase><casetoadd>[options] Example
mergeMeshesstatorrotor(OF21) mergeMeshes.stator.rotor(OF16ext)
subsetMesh
splitMeshRegions[options]
checkMesh
setSet cell
GGI interface
constant/polyMesh/boundary
int1 {type nfaces startFace shadowPatch zone int2 {type nfaces startFace shadowPatch zone ggi; 333; 989000; int1; rightZone; ggi; 299; 988976; int2; leftZone;
faceSet zone .
bridgeOverlap false;}
setsToZonesnoFlipMap
constant/polyMesh/boundary 0/<boundaryfile>
int1 {type ggi;}
bridgeOverlap false;}
rotor1 rotor2 rotor1 { type nface startFace zone cyclicGgi; 2344; 234666;
rotor_in stator_out rotor_in { type startFace zone overlapGgi; 234666; nface 2344; shadowPatch stator_out; rotor_in_zone; rotationAxis (001); ncopies 6; }
shadowPatch rotor2; rotor1Zone; bridgeOverlap off; rotationAxis (001); rotationAngle 60; separationOffset off; }
AMI interface
Patch handling
autoPatch[options]<featureangle[0180]>
featureangle Example
autoPatchoverwrite90
createPatch[options]
createPatchoverwrite
Patch handling
createPatchDict matchTolerance patches ( { name patchInfo { type patch;} constructFrom set; set } ); waterin; waterInlet; 1e3; pointSync true;
Boundary conditions
fixedValue
type value fixedValue; uniform(000);
fixedMeanValue
type fixedMeanValue; 1; meanValue
zeroGradient
type zeroGradient; surfaceNormalFixedValue; uniform1; uniform(000);
pressureInletOutletVelocity
type value pressureInletOutletVelocity; uniform(000); inletOutlet; uniform(000);
surfaceNormalFixedValue
type value
inletOutlet
type value inletValue uniform(000);
refValue
Boundary conditions
flowRateInletVelocity
AtmboundaryLayerInletVelocity
type atmBoundaryLayerInletVelocity; Uref 1.2 Href n z z0 300; (100); (001); uniform0.03; uniform(100); uniform323;
totalPressure
outletMappedUniformInlet
value
zGround
outletPatchName
Boundary conditions
Heattransfercoeff.
type Tinf value wallHeatTransfer; uniform300; uniform5;
mixed fixedEnthalpy fixedInternalEnergy gradientEnthalpy gradientInternalEnergy mixedEnthalpy mixedInternalEnergy totalTemperature externalWallHeatFluxTemperature compressible::turbulentTemperatureCou pledBaffle compressible::turbulentTemperatureRad CoupledMixed
alphaWall uniform1e5;
heatflux
type compressible::turbulentHeatFluxTe mperature; heatSource flux;//power q K uniform10; basicThermo; uniform300; none;
value KName
From2.1.0 UniformFixedValue FlowRateInletVelocity UniformTotalPressure oscillating... Example1 type uniformFixedValue; uniformValue table ( (0 0.1) (100 ); 10.0)
Example2 type (
(01.0) (13.0)
flowRateInletVelocity;
flowRate table
); Example3 type uniformTotalPressure; pressure table ((010)(140)); p0 U phi gamma value 40; U phi 1.4; uniform40;
Boundary conditions
groovyBC
swak4Foam keyword
type:groobyBC variable: , ;, valueExpression:C++ type variables valueExpression value groovyBC; "con{out}=sum(CH4*mag(Sf()))/sum(mag(Sf()));"; "con"; uniform0.1; groovyBC; "ccc=time()*0.1;"; "ccc"; uniform0;
Example1
Example2
type variables
valueExpression value
codeStream
Example
scalarExplicitSourceCoeffs { volumeMode specific; injectionRate {S #codeStream { code #{scalar aa=100; scalar bb=10; os<<(aa+bb);#} }; } }
turbulence
Constant
turbulenceProperties
laminarRASModel,LES
RASProperties
kepsilon,kOmega,SpalartAllmaras...
roughWallFunction
alphat
Convergence criteria
parallel
hostfile
node1 cpu=12 node2 cpu=12 node3 cpu=12
patchContrainedexample
type { method metis; numberOfSubDomains 6; patchConstraints ((rotorInlet1) (statorOutlet1)); } patchConstrained; patchConstrainedCoeffs
reconstructParlatestTime ReconstructPartime***
monitoring
pyFoam
pyFoamPlotRunner.py<solver>
pyFoamPlotRunner.pysimpleFoam
pyFoamPlotRunner.pympirunhostfile<hostfile name>hostsnp<#ofcore><solver>parallel
pyFoamPlotRunner.pympirunhostfilehostsnp36 simpleFoamparallel
Function
libs (<libraryname>.so);
type value
Function
areaweighedaverage areaAverage { type patchAverage functionObjectLibs (libsimpleFunctionObjects.so) verbose fields patches factor } true; (pTUrho); (faceAfaceB); 1;
}
massweighedaverage massAverage { type patchMassflowAverage functionObjectLibs (libsimpleFunctionObjects.so) verbose fields patches factor true; (pTUrho); (faceAfaceB); 1;
Function
inletMassFlow { type patchMassFlow; functionObjectLibs (libsimpleFunctionObjects .so); verbose true; patches (faceA); factor 1; }
Volumeintegral libs (libsimpleFunctionObjects.so); totalLiquid { type volumeIntegrate; fileds } (alpha1); verbose true;
Function
Areaintegral faceA { type faceSource; functionObjectLibs (libfieldFunctionObjects.so); enable region log source true; solidA; true; false; patch; minX; areaIntegrate; (pUT); outputControl outputTime;
Pointvalue pointValues { type enable region log source probes; true; fluidA; true; false; point; functionObjectLibs (libsampling.so); outputControl timeStep;
valueOutput probeLocations
Function
force force { type forces; functionObjectLibs (libforces.so); outputControl timeStep; outputInterval 1; patches rhoInf nuInf CofR } (faceAfaceB); 1.2; 1e6; (000);
Forcecoefficient forceCoeffs { type forceCoeffs; timeStep; 1; (faceAfaceB); rhoInf; p; U; 1.2; (000); (010); (100); (001); 1; 1; functionObjectLibs (libforces.so); outputControl outputInterval patches rhoName pName UName rhoInf CofR liftDir dragDir pitchAxis lRef Aref }
customRegexp
customRegexp DragCoeff { expr name titles type } Cd=(%f%); CdHistory; (dragcoefficient); regular;
theTitle foreccoefficient;
ETC
setFields
setFieldsDict mapFieldsDict
mapFields
Post-processing
utilities