potentialFoam: Solve for velocity potential named Phi rather than using the pressure field for this purpose
The Phi field is read if available otherwise created automatically with boundary conditions obtained automatically from the pressure field if available (with optional name) otherwise inferred from the velocity field. Phi Laplacian scheme and solver specification are required. See tutorials for examples.
This commit is contained in:
@ -6,26 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
application=`getApplication`
|
||||
|
||||
|
||||
# This case uses the #codeStream which is disabled by default. Enable for
|
||||
# just this case.
|
||||
MAIN_CONTROL_DICT=`foamEtcFile controlDict`
|
||||
if [ -f "$MAIN_CONTROL_DICT" ]
|
||||
then
|
||||
echo "Modifying ${MAIN_CONTROL_DICT} to enable allowSystemOperations"
|
||||
|
||||
# Clean up on termination and on Ctrl-C
|
||||
trap 'mv ${MAIN_CONTROL_DICT}.$$ ${MAIN_CONTROL_DICT} 2>/dev/null; exit 0' \
|
||||
EXIT TERM INT
|
||||
cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.$$
|
||||
|
||||
echo "Enabling allowSystemOperations in ${MAIN_CONTROL_DICT}."
|
||||
|
||||
sed \
|
||||
-e s/"\(allowSystemOperations[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
||||
${MAIN_CONTROL_DICT}.$$ > ${MAIN_CONTROL_DICT}
|
||||
fi
|
||||
|
||||
cp -r 0.org 0 > /dev/null 2>&1
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
@ -48,7 +48,7 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
Phi ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
Phi
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
@ -48,7 +48,7 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
Phi ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
Phi
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
@ -55,7 +55,8 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
p;
|
||||
Phi;
|
||||
}
|
||||
|
||||
wallDist
|
||||
|
||||
@ -38,6 +38,11 @@ solvers
|
||||
relTol 0;
|
||||
};
|
||||
|
||||
Phi
|
||||
{
|
||||
$p;
|
||||
}
|
||||
|
||||
"(U|nuTilda)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
|
||||
@ -53,6 +53,7 @@ fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
Phi;
|
||||
}
|
||||
|
||||
wallDist
|
||||
|
||||
@ -30,6 +30,11 @@ solvers
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
Phi
|
||||
{
|
||||
$p;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver smoothSolver;
|
||||
|
||||
@ -7,26 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Get application directory
|
||||
application=`getApplication`
|
||||
|
||||
# This case uses the #codeStream which is disabled by default. Enable for
|
||||
# just this case.
|
||||
MAIN_CONTROL_DICT=`foamEtcFile controlDict`
|
||||
if [ -f "$MAIN_CONTROL_DICT" ]
|
||||
then
|
||||
echo "Modifying ${MAIN_CONTROL_DICT} to enable allowSystemOperations"
|
||||
|
||||
# Clean up on termination and on Ctrl-C
|
||||
trap 'mv ${MAIN_CONTROL_DICT}.$$ ${MAIN_CONTROL_DICT} 2>/dev/null; exit 0' \
|
||||
EXIT TERM INT
|
||||
cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.$$
|
||||
|
||||
echo "Enabling allowSystemOperations in ${MAIN_CONTROL_DICT}."
|
||||
|
||||
sed \
|
||||
-e s/"\(allowSystemOperations[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
||||
${MAIN_CONTROL_DICT}.$$ > ${MAIN_CONTROL_DICT}
|
||||
fi
|
||||
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication refineHexMesh c0 -overwrite
|
||||
|
||||
@ -58,6 +58,7 @@ fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
Phi;
|
||||
}
|
||||
|
||||
wallDist
|
||||
|
||||
@ -68,6 +68,11 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
Phi
|
||||
{
|
||||
$p;
|
||||
}
|
||||
|
||||
"(Yi|O2|N2|H2O)"
|
||||
{
|
||||
solver PBiCG;
|
||||
@ -88,7 +93,7 @@ solvers
|
||||
|
||||
potentialFlow
|
||||
{
|
||||
// used for potentialFoam initialisation
|
||||
// Used for potentialFoam initialisation
|
||||
nNonOrthogonalCorrectors 5;
|
||||
}
|
||||
|
||||
|
||||
@ -59,6 +59,7 @@ fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
Phi;
|
||||
}
|
||||
|
||||
wallDist
|
||||
|
||||
@ -37,6 +37,11 @@ solvers
|
||||
maxIter 50;
|
||||
};
|
||||
|
||||
Phi
|
||||
{
|
||||
$p;
|
||||
}
|
||||
|
||||
"(U|Yi|h|k|omega)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
|
||||
Reference in New Issue
Block a user