mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improve codeTemplates
- meshTools include/library for many (most) coded items - add PatchFunction1 include for coded BCs to provide ready access to Function1 and PatchFunction1
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / O peration | Version: v2106 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -59,7 +59,6 @@ maxCo 1.2;
|
||||
|
||||
functions
|
||||
{
|
||||
// #include "catalyst"
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
@ -82,7 +81,6 @@ functions
|
||||
(
|
||||
(0.015 0.005 0.005)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
mass
|
||||
@ -114,12 +112,10 @@ functions
|
||||
|
||||
codeWrite
|
||||
#{
|
||||
|
||||
const volScalarField& rho =
|
||||
mesh().lookupObject<volScalarField>("rho");
|
||||
|
||||
Info<< "rho volume = " << rho.weightedAverage(mesh().Vsc()) << endl;
|
||||
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2012 |
|
||||
| \\ / O peration | Version: v2106 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -24,19 +24,14 @@ functions
|
||||
libs (utilityFunctionObjects);
|
||||
enabled yes;
|
||||
|
||||
codeInclude
|
||||
#{
|
||||
#include "volFields.H"
|
||||
#};
|
||||
|
||||
codeWrite
|
||||
#{
|
||||
scalar D = 0.57;
|
||||
scalar UInf = 50;
|
||||
scalar pInf = 101325;
|
||||
scalar TInf = 224;
|
||||
scalar gamma = 1.4;
|
||||
scalar A = -0.3*D*UInf;
|
||||
const scalar D = 0.57;
|
||||
const scalar UInf = 50;
|
||||
const scalar pInf = 101325;
|
||||
const scalar TInf = 224;
|
||||
const scalar gamma = 1.4;
|
||||
const scalar A = -0.3*D*UInf;
|
||||
const dimensionedScalar rhoRef("rhoRef", dimDensity, 1);
|
||||
const auto& rho = mesh().lookupObject<volScalarField>("rho");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user