mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Feature grad update
This commit is contained in:
committed by
Andrew Heather
parent
f186b0098b
commit
e100e4d084
@ -19,4 +19,12 @@ sed "s/GAUSS/fusedGauss/g" system/fvSchemes.template > system/fvSchemes
|
||||
runParallel -s fusedGauss $(getApplication)
|
||||
|
||||
|
||||
echo "Updating fvSolution to cache gradients"
|
||||
sed 's/GRADIENT/"grad(.*)"/g' system/fvSolution.template > system/fvSolution
|
||||
|
||||
runParallel -s fusedGaussCached $(getApplication)
|
||||
|
||||
# Restore
|
||||
cp system/fvSolution.template system/fvSolution
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -16,6 +16,15 @@ FoamFile
|
||||
|
||||
libs (fusedFiniteVolume);
|
||||
|
||||
/*
|
||||
DebugSwitches
|
||||
{
|
||||
fusedGauss 1;
|
||||
Gauss 1;
|
||||
solution 1;
|
||||
}
|
||||
*/
|
||||
|
||||
application simpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -55,5 +55,11 @@ relaxationFactors
|
||||
}
|
||||
}
|
||||
|
||||
cache
|
||||
{
|
||||
// Cache all grads
|
||||
GRADIENT;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2506 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
smoother GaussSeidel;
|
||||
}
|
||||
|
||||
"(U|k|epsilon|omega|f|v2)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
consistent yes;
|
||||
|
||||
residualControl
|
||||
{
|
||||
p 1e-2;
|
||||
U 1e-3;
|
||||
"(k|epsilon|omega|f|v2)" 1e-3;
|
||||
}
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
U 0.9; // 0.9 is more stable but 0.95 more convergent
|
||||
".*" 0.9; // 0.9 is more stable but 0.95 more convergent
|
||||
}
|
||||
}
|
||||
|
||||
cache
|
||||
{
|
||||
// Cache all grads
|
||||
GRADIENT;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user