mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: porousExplicitSourceReactingParcelFoam: avoid nans
This commit is contained in:
@ -16,11 +16,16 @@ setSet -batch system/sets.setSet > log.setSet1 2>&1
|
|||||||
setsToZones -noFlipMap > log.setsToZones 2>&1
|
setsToZones -noFlipMap > log.setsToZones 2>&1
|
||||||
|
|
||||||
# create the first cyclic - lhs of porous zone
|
# create the first cyclic - lhs of porous zone
|
||||||
unset FOAM_SETNAN
|
# Note that we don't know what value to give these patches-out-of-nothing so
|
||||||
|
# - use binary writing to avoid 'nan'
|
||||||
|
# - use setFields to set values
|
||||||
|
unset FOAM_SIGFPE
|
||||||
createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite > log.createBaffles1 2>&1
|
createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite > log.createBaffles1 2>&1
|
||||||
|
|
||||||
# create the second cyclic - rhs of porous zone
|
# create the second cyclic - rhs of porous zone
|
||||||
createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite > log.createBaffles2 2>&1
|
createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite > log.createBaffles2 2>&1
|
||||||
|
# Initialise newly created patchFields to 0
|
||||||
|
changeDictionary
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,197 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.7.1 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object changeDictionaryDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dictionaryReplacement
|
||||||
|
{
|
||||||
|
alphat
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
epsilon
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
G
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
H2O
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mut
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
N2
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
O2
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
T
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
U
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
cycLeft
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
cycRight
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -33,7 +33,7 @@ writeInterval 0.1;
|
|||||||
|
|
||||||
purgeWrite 0;
|
purgeWrite 0;
|
||||||
|
|
||||||
writeFormat ascii;
|
writeFormat binary;
|
||||||
|
|
||||||
writePrecision 10;
|
writePrecision 10;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user