mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2212 |
|
| \\ / O peration | Version: v2306 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -40,8 +40,12 @@ boundaryField
|
|||||||
|
|
||||||
outlet1
|
outlet1
|
||||||
{
|
{
|
||||||
type exprFixedValue;
|
type uniformFixedValue;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
|
|
||||||
|
uniformValue
|
||||||
|
{
|
||||||
|
type expression;
|
||||||
// debug true;
|
// debug true;
|
||||||
// debug.scanner true;
|
// debug.scanner true;
|
||||||
// debug.parser true;
|
// debug.parser true;
|
||||||
@ -52,7 +56,8 @@ boundaryField
|
|||||||
"pOutlet2{outlet2} = p"
|
"pOutlet2{outlet2} = p"
|
||||||
);
|
);
|
||||||
|
|
||||||
valueExpr "0.5*(pInlet + pOutlet2)";
|
expression "0.5*(pInlet + pOutlet2)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
outlet2
|
outlet2
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2212 |
|
| \\ / O peration | Version: v2306 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -38,7 +38,11 @@ boundaryField
|
|||||||
value uniform 350;
|
value uniform 350;
|
||||||
|
|
||||||
// For general testing purposes:
|
// For general testing purposes:
|
||||||
type exprFixedValue;
|
type uniformFixedValue;
|
||||||
|
|
||||||
|
uniformValue
|
||||||
|
{
|
||||||
|
type expression;
|
||||||
|
|
||||||
functions<scalar>
|
functions<scalar>
|
||||||
{
|
{
|
||||||
@ -56,13 +60,14 @@ boundaryField
|
|||||||
"par1 = mag(internalField(U))/snGrad(T)"
|
"par1 = mag(internalField(U))/snGrad(T)"
|
||||||
);
|
);
|
||||||
|
|
||||||
valueExpr
|
expression
|
||||||
#{
|
#{
|
||||||
Tcrit
|
Tcrit
|
||||||
+ par1*internalField(T) * max((Tcrit-T)/(Tcrit)*deltaT()/time(),0)
|
+ par1*internalField(T) * max((Tcrit-T)/(Tcrit)*deltaT()/time(),0)
|
||||||
#};
|
#};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user