mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: runTime selectable disabling of matrix norm (#2500)
For example,
T
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
norm none;
}
STYLE: define defaultMaxIter, defaultTolerance directly in lduMatrix
This commit is contained in:
19
tutorials/basic/scalarTransportFoam/Allclean
Executable file
19
tutorials/basic/scalarTransportFoam/Allclean
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
keepCases="pitzDaily"
|
||||
loseCases="pitzDaily-stepFunction"
|
||||
|
||||
for caseName in $keepCases
|
||||
do
|
||||
foamCleanTutorials -case="$caseName"
|
||||
done
|
||||
|
||||
for caseName in $loseCases
|
||||
do
|
||||
removeCase $caseName
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
36
tutorials/basic/scalarTransportFoam/Allrun
Executable file
36
tutorials/basic/scalarTransportFoam/Allrun
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Do pitzDaily
|
||||
( cd pitzDaily && foamRunTutorials )
|
||||
|
||||
if true ## if notTest "$@"
|
||||
then
|
||||
# Clone case for additional tests
|
||||
cloneCase pitzDaily pitzDaily-stepFunction
|
||||
|
||||
# Modify and execute
|
||||
(
|
||||
cd pitzDaily-stepFunction || exit
|
||||
|
||||
# Run a bit longer
|
||||
foamDictionary system/controlDict -entry endTime -set 0.2
|
||||
|
||||
# Use table input to start scalar at 0.1s
|
||||
##runApplication changeDictionary -time 0
|
||||
foamDictionary 0/T \
|
||||
-entry boundaryField/inlet/uniformValue/type \
|
||||
-set table
|
||||
|
||||
# Use 'none' for matrix norm
|
||||
foamDictionary system/fvSolution \
|
||||
-entry solvers/T/norm \
|
||||
-set none
|
||||
|
||||
foamRunTutorials
|
||||
)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -22,28 +22,41 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
type uniformFixedValue;
|
||||
|
||||
uniformValue
|
||||
{
|
||||
type constant;
|
||||
value 1.0;
|
||||
|
||||
// Table entries (for modified version)
|
||||
values
|
||||
(
|
||||
(0 1e-12)
|
||||
(0.1 1e-12)
|
||||
(0.10001 1.0)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
T
|
||||
{
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
|
||||
uniformValue
|
||||
{
|
||||
type table;
|
||||
|
||||
values
|
||||
(
|
||||
(0 1e-12)
|
||||
(0.1 1e-12)
|
||||
(0.10001 20)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / O peration | Version: v2212 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -20,8 +20,9 @@ solvers
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
norm default;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user