|
[Sponsors] |
How to add additional header / libs to an codedSource |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 15, 2021, 07:32 |
How to add additional header / libs to an codedSource
|
#1 | |
Member
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14 |
Hello,
I will use an scalarCodedSource in an fvOptions with access to turbulence model functions as the example. Code:
options { sourceTerm1 { type scalarCodedSource; selectionMode cellSet; cellSet myCellSetForSourceTerm1; fields (h); name source1; codeInclude #{ #include "fvCFD.H" #include "fvc.H" //#include "fluidThermo.H" //#include "compressibleTurbulenceModel.H" //#include "turbulentTransportModel.H" #}; codeCorrect #{ #}; codeAddSup #{ // get fields const scalarField& volume = mesh_.V(); const volScalarField& cellT = mesh_.lookupObject<volScalarField> ("T"); const volVectorField& cellU = mesh_.lookupObject<volVectorField> ("U"); //const dictionary& transportProperties = db().lookupObject<IOdictionary> ("transportProperties"); const dictionary& transportProperties = mesh_.lookupObject<IOdictionary> ("transportProperties"); const compressible::turbulenceModel& turbModel = mesh_.lookupObject<compressible::turbulenceModel> (turbulenceModel::propertiesName); const fluidThermo& thermo = mesh_.lookupObject<fluidThermo> (basicThermo::dictName); #}; codeConstrain #{ #}; } } Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Condensation as an additional variable | Clark Griswold | CFX | 2 | April 21, 2012 07:20 |
[snappyHexMesh] Add additional boundary layers to complex stl surface | tobijingles | OpenFOAM Meshing & Mesh Conversion | 1 | October 26, 2011 10:45 |
Add additional scalar to turbulence model | john_w | OpenFOAM | 1 | December 23, 2010 12:45 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |
how to add header file | shanu | FLUENT | 1 | February 14, 2006 09:00 |