TUT: replace exprFixedValue with uniformFixedValue
- wish to deprecate and remove exprFixedValue in the future since the same functionality is possible using patch expressions with a uniformFixedValue condition.
This commit is contained in:
parent
a6b3a31b28
commit
b93f038ea3
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -40,19 +40,24 @@ boundaryField
|
||||
|
||||
outlet1
|
||||
{
|
||||
type exprFixedValue;
|
||||
type uniformFixedValue;
|
||||
value $internalField;
|
||||
// debug true;
|
||||
// debug.scanner true;
|
||||
// debug.parser true;
|
||||
|
||||
variables
|
||||
(
|
||||
"pInlet{inlet} = weightAverage(p)"
|
||||
"pOutlet2{outlet2} = p"
|
||||
);
|
||||
uniformValue
|
||||
{
|
||||
type expression;
|
||||
// debug true;
|
||||
// debug.scanner true;
|
||||
// debug.parser true;
|
||||
|
||||
valueExpr "0.5*(pInlet + pOutlet2)";
|
||||
variables
|
||||
(
|
||||
"pInlet{inlet} = weightAverage(p)"
|
||||
"pOutlet2{outlet2} = p"
|
||||
);
|
||||
|
||||
expression "0.5*(pInlet + pOutlet2)";
|
||||
}
|
||||
}
|
||||
|
||||
outlet2
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / O peration | Version: v2306 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -38,29 +38,34 @@ boundaryField
|
||||
value uniform 350;
|
||||
|
||||
// For general testing purposes:
|
||||
type exprFixedValue;
|
||||
type uniformFixedValue;
|
||||
|
||||
functions<scalar>
|
||||
uniformValue
|
||||
{
|
||||
trigger
|
||||
type expression;
|
||||
|
||||
functions<scalar>
|
||||
{
|
||||
type functionObjectTrigger;
|
||||
triggers (2 4);
|
||||
defaultValue true;
|
||||
trigger
|
||||
{
|
||||
type functionObjectTrigger;
|
||||
triggers (2 4);
|
||||
defaultValue true;
|
||||
}
|
||||
}
|
||||
|
||||
variables
|
||||
(
|
||||
"Tcrit = 500"
|
||||
"par1 = mag(internalField(U))/snGrad(T)"
|
||||
);
|
||||
|
||||
expression
|
||||
#{
|
||||
Tcrit
|
||||
+ par1*internalField(T) * max((Tcrit-T)/(Tcrit)*deltaT()/time(),0)
|
||||
#};
|
||||
}
|
||||
|
||||
variables
|
||||
(
|
||||
"Tcrit = 500"
|
||||
"par1 = mag(internalField(U))/snGrad(T)"
|
||||
);
|
||||
|
||||
valueExpr
|
||||
#{
|
||||
Tcrit
|
||||
+ par1*internalField(T) * max((Tcrit-T)/(Tcrit)*deltaT()/time(),0)
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user