updated tutorial for wildcards in changeDictionaryDict

This commit is contained in:
mattijs
2009-12-07 17:03:32 +00:00
parent ef3e39dd38
commit 3c6befa360
19 changed files with 148 additions and 866 deletions

View File

@ -20,31 +20,9 @@ internalField uniform 80;
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type calculated;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
} }
} }

View File

@ -20,32 +20,9 @@ internalField uniform 300;
boundaryField boundaryField
{ {
minX ".*"
{ {
type fixedValue; type calculated;
value uniform 300;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
} }
} }

View File

@ -20,37 +20,9 @@ internalField uniform (0.01 0 0);
boundaryField boundaryField
{ {
minX ".*"
{ {
type fixedValue; type calculated;
value uniform (0.01 0 0);
}
maxX
{
type inletOutlet;
inletValue uniform (0 0 0);
}
minY
{
type fixedValue;
value uniform (0 0 0);
}
maxY
{
type fixedValue;
value uniform (0 0 0);
}
minZ
{
type fixedValue;
value uniform (0 0 0);
}
maxZ
{
type fixedValue;
value uniform (0 0 0);
} }
} }

View File

@ -20,31 +20,9 @@ internalField uniform 450;
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type calculated;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
} }
} }

View File

@ -21,46 +21,9 @@ internalField uniform 0.01;
boundaryField boundaryField
{ {
minY ".*"
{ {
type epsilonWallFunction; type calculated;
value uniform 0.01;
}
maxY
{
type epsilonWallFunction;
value uniform 0.01;
}
minX
{
type fixedValue;
value uniform 0.01;
}
maxX
{
type zeroGradient;
}
minZ
{
type epsilonWallFunction;
value uniform 0.01;
}
maxZ
{
type epsilonWallFunction;
value uniform 0.01;
}
topAir_to_leftSolid
{
type zeroGradient;
}
topAir_to_heater
{
type zeroGradient;
}
topAir_to_rightSolid
{
type zeroGradient;
} }
} }

View File

@ -21,46 +21,9 @@ internalField uniform 0.1;
boundaryField boundaryField
{ {
minY ".*"
{ {
type kqRWallFunction; type calculated;
value uniform 0.1;
}
maxY
{
type kqRWallFunction;
value uniform 0.1;
}
minX
{
type fixedValue;
value uniform 0.1;
}
maxX
{
type zeroGradient;
}
minZ
{
type kqRWallFunction;
value uniform 0.1;
}
maxZ
{
type kqRWallFunction;
value uniform 0.1;
}
topAir_to_leftSolid
{
type zeroGradient;
}
topAir_to_heater
{
type zeroGradient;
}
topAir_to_rightSolid
{
type zeroGradient;
} }
} }

View File

@ -20,36 +20,9 @@ internalField uniform 1e5;
boundaryField boundaryField
{ {
minX ".*"
{ {
type buoyantPressure; type calculated;
value 1e5;
}
maxX
{
type buoyantPressure;
value 1e5;
}
minY
{
type buoyantPressure;
value 1e5;
}
maxY
{
type buoyantPressure;
value 1e5;
}
minZ
{
type buoyantPressure;
value 1e5;
}
maxZ
{
type buoyantPressure;
value 1e5;
} }
} }

View File

@ -20,31 +20,9 @@ internalField uniform 8000;
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type calculated;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
} }
} }

View File

@ -13,11 +13,6 @@ rm -f constant/polyMesh/sets/*_old
runApplication setsToZones -noFlipMap runApplication setsToZones -noFlipMap
runApplication splitMeshRegions -cellZones runApplication splitMeshRegions -cellZones
for i in bottomAir topAir heater leftSolid rightSolid
do
changeDictionary -region $i >& log.changeDictionary.$i
done
# remove fluid fields from solid regions (important for post-processing) # remove fluid fields from solid regions (important for post-processing)
for i in heater leftSolid rightSolid for i in heater leftSolid rightSolid
do do
@ -27,7 +22,12 @@ done
# remove solid fields from fluid regions (important for post-processing) # remove solid fields from fluid regions (important for post-processing)
for i in bottomAir topAir for i in bottomAir topAir
do do
rm -f 0*/$i/{cp,K} rm -f 0*/$i/{cp,K,rho}
done
for i in bottomAir topAir heater leftSolid rightSolid
do
changeDictionary -region $i >& log.changeDictionary.$i
done done

View File

@ -0,0 +1,2 @@
The 0/ field files contain nonsense patchFields. All interesting
work is done using the changeDictionaryDicts.

View File

@ -14,9 +14,9 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon; RASModel laminar;
turbulence off; turbulence on;
printCoeffs on; printCoeffs on;

View File

@ -10,13 +10,11 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class uniformDimensionedVectorField; class uniformDimensionedVectorField;
location "constant";
object g; object g;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0]; dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 ); value (0 -9.81 0);
// ************************************************************************* // // ************************************************************************* //

View File

@ -14,9 +14,9 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon; RASModel laminar;
turbulence off; turbulence on;
printCoeffs on; printCoeffs on;

View File

@ -10,13 +10,11 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class uniformDimensionedVectorField; class uniformDimensionedVectorField;
location "constant";
object g; object g;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0]; dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 ); value (0 -9.81 0);
// ************************************************************************* // // ************************************************************************* //

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{ {
boundary boundary
{ {
".*"
{
type wall;
}
bottomAir_to_leftSolid bottomAir_to_leftSolid
{ {
offset ( 0 0 0 ); offset ( 0 0 0 );
@ -43,32 +47,11 @@ dictionaryReplacement
U U
{ {
internalField uniform (0 0 0); internalField uniform (0.01 0 0);
boundaryField boundaryField
{ {
minX ".*"
{
type fixedValue;
value uniform (0 0 0);
}
maxX
{
type fixedValue;
value uniform (0 0 0);
}
bottomAir_to_leftSolid
{
type fixedValue;
value uniform (0 0 0);
}
bottomAir_to_heater
{
type fixedValue;
value uniform (0 0 0);
}
bottomAir_to_rightSolid
{ {
type fixedValue; type fixedValue;
value uniform (0 0 0); value uniform (0 0 0);
@ -78,28 +61,16 @@ dictionaryReplacement
T T
{ {
internalField uniform 300;
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type zeroGradient;
} }
bottomAir_to_leftSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
} "bottomAir_to_.*"
bottomAir_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
bottomAir_to_rightSolid
{ {
type compressible::turbulentTemperatureCoupledBaffle; type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T; neighbourFieldName T;
@ -111,58 +82,13 @@ dictionaryReplacement
epsilon epsilon
{ {
// Set the value on all bc to non-zero. Not used in simulation
// since zeroGradient; only used in initialisation.
internalField uniform 0.01; internalField uniform 0.01;
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type compressible::epsilonWallFunction;
value uniform 0.01;
}
maxX
{
type zeroGradient;
value uniform 0.01;
}
minY
{
type zeroGradient;
value uniform 0.01;
}
maxY
{
type zeroGradient;
value uniform 0.01;
}
minZ
{
type zeroGradient;
value uniform 0.01;
}
maxZ
{
type zeroGradient;
value uniform 0.01;
}
bottomAir_to_leftSolid
{
type zeroGradient;
value uniform 0.01;
}
bottomAir_to_heater
{
type zeroGradient;
value uniform 0.01;
}
bottomAir_to_rightSolid
{
type zeroGradient;
value uniform 0.01; value uniform 0.01;
} }
} }
@ -171,54 +97,12 @@ dictionaryReplacement
k k
{ {
internalField uniform 0.1; internalField uniform 0.1;
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type compressible::kqRWallFunction;
value uniform 0.1;
}
maxX
{
type zeroGradient;
value uniform 0.1;
}
minY
{
type zeroGradient;
value uniform 0.1;
}
maxY
{
type zeroGradient;
value uniform 0.1;
}
minZ
{
type zeroGradient;
value uniform 0.1;
}
maxZ
{
type zeroGradient;
value uniform 0.1;
}
bottomAir_to_leftSolid
{
type zeroGradient;
value uniform 0.1;
}
bottomAir_to_heater
{
type zeroGradient;
value uniform 0.1;
}
bottomAir_to_rightSolid
{
type zeroGradient;
value uniform 0.1; value uniform 0.1;
} }
} }
@ -226,53 +110,17 @@ dictionaryReplacement
p p
{ {
internalField uniform 1E5; internalField uniform 100000;
boundaryField boundaryField
{ {
minX ".*"
{
type buoyantPressure;
value 1e5;
}
maxX
{
type buoyantPressure;
value 1e5;
}
minY
{
type buoyantPressure;
value 1e5;
}
minZ
{
type buoyantPressure;
value 1e5;
}
maxZ
{
type buoyantPressure;
value 1e5;
}
bottomAir_to_leftSolid
{
type buoyantPressure;
value 1e5;
}
bottomAir_to_heater
{
type buoyantPressure;
value 1e5;
}
bottomAir_to_rightSolid
{ {
type buoyantPressure; type buoyantPressure;
value 1e5; value 1e5;
} }
} }
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{ {
boundary boundary
{ {
".*"
{
type patch;
}
heater_to_bottomAir heater_to_bottomAir
{ {
offset ( 0 0 0 ); offset ( 0 0 0 );
@ -54,50 +58,23 @@ dictionaryReplacement
boundaryField boundaryField
{ {
".*"
{
type zeroGradient;
value uniform 300;
}
"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
minY minY
{ {
type fixedValue; type fixedValue;
value uniform 500; value uniform 500;
} }
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
heater_to_leftSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
heater_to_rightSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
heater_to_topAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
} }
} }
@ -107,33 +84,9 @@ dictionaryReplacement
boundaryField boundaryField
{ {
minY ".*"
{ {
type zeroGradient; type calculated;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type zeroGradient;
}
heater_to_leftSolid
{
type zeroGradient;
}
heater_to_rightSolid
{
type zeroGradient;
}
heater_to_topAir
{
type zeroGradient;
} }
} }
} }
@ -144,31 +97,7 @@ dictionaryReplacement
boundaryField boundaryField
{ {
minY ".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type zeroGradient;
}
heater_to_leftSolid
{
type zeroGradient;
}
heater_to_rightSolid
{
type zeroGradient;
}
heater_to_topAir
{ {
type zeroGradient; type zeroGradient;
} }
@ -181,31 +110,7 @@ dictionaryReplacement
boundaryField boundaryField
{ {
minY ".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
heater_to_bottomAir
{
type zeroGradient;
}
heater_to_leftSolid
{
type zeroGradient;
}
heater_to_rightSolid
{
type zeroGradient;
}
heater_to_topAir
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{ {
boundary boundary
{ {
".*"
{
type patch;
}
leftSolid_to_bottomAir leftSolid_to_bottomAir
{ {
offset ( 0 0 0 ); offset ( 0 0 0 );
@ -47,34 +51,12 @@ dictionaryReplacement
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
leftSolid_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300; value uniform 300;
} }
leftSolid_to_topAir "leftSolid_to_.*"
{ {
type compressible::turbulentTemperatureCoupledBaffle; type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T; neighbourFieldName T;
@ -90,29 +72,9 @@ dictionaryReplacement
boundaryField boundaryField
{ {
minX ".*"
{ {
type zeroGradient; type calculated;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type zeroGradient;
}
leftSolid_to_heater
{
type zeroGradient;
}
leftSolid_to_topAir
{
type zeroGradient;
} }
} }
} }
@ -123,27 +85,7 @@ dictionaryReplacement
boundaryField boundaryField
{ {
minX ".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type zeroGradient;
}
leftSolid_to_heater
{
type zeroGradient;
}
leftSolid_to_topAir
{ {
type zeroGradient; type zeroGradient;
} }
@ -156,27 +98,7 @@ dictionaryReplacement
boundaryField boundaryField
{ {
minX ".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
leftSolid_to_bottomAir
{
type zeroGradient;
}
leftSolid_to_heater
{
type zeroGradient;
}
leftSolid_to_topAir
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{ {
boundary boundary
{ {
".*"
{
type patch;
}
rightSolid_to_heater rightSolid_to_heater
{ {
offset ( 0 0 0 ); offset ( 0 0 0 );
@ -47,33 +51,12 @@ dictionaryReplacement
boundaryField boundaryField
{ {
maxX ".*"
{ {
type zeroGradient; type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300; value uniform 300;
} }
rightSolid_to_bottomAir "rightSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
rightSolid_to_topAir
{ {
type compressible::turbulentTemperatureCoupledBaffle; type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T; neighbourFieldName T;
@ -89,29 +72,9 @@ dictionaryReplacement
boundaryField boundaryField
{ {
maxX ".*"
{ {
type zeroGradient; type calculated;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_bottomAir
{
type zeroGradient;
}
rightSolid_to_heater
{
type zeroGradient;
}
rightSolid_to_topAir
{
type zeroGradient;
} }
} }
} }
@ -122,27 +85,7 @@ dictionaryReplacement
boundaryField boundaryField
{ {
maxX ".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_bottomAir
{
type zeroGradient;
}
rightSolid_to_heater
{
type zeroGradient;
}
rightSolid_to_topAir
{ {
type zeroGradient; type zeroGradient;
} }
@ -155,27 +98,7 @@ dictionaryReplacement
boundaryField boundaryField
{ {
maxX ".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_bottomAir
{
type zeroGradient;
}
rightSolid_to_heater
{
type zeroGradient;
}
rightSolid_to_topAir
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -18,6 +18,18 @@ dictionaryReplacement
{ {
boundary boundary
{ {
".*"
{
type wall;
}
minX
{
type patch;
}
maxX
{
type patch;
}
topAir_to_leftSolid topAir_to_leftSolid
{ {
offset ( 0 0 0 ); offset ( 0 0 0 );
@ -43,64 +55,53 @@ dictionaryReplacement
U U
{ {
internalField uniform ( 0.01 0 0 ); internalField uniform (0.01 0 0);
boundaryField boundaryField
{ {
".*"
{
type fixedValue;
value uniform (0 0 0);
}
minX minX
{ {
type fixedValue; type fixedValue;
value uniform (0.01 0 0); value uniform ( 0.01 0 0 );
} }
maxX maxX
{ {
type inletOutlet; type inletOutlet;
inletValue uniform (0 0 0); inletValue uniform ( 0 0 0 );
} value uniform ( 0 0 0 );
topAir_to_leftSolid
{
type fixedValue;
value uniform (0 0 0);
}
topAir_to_heater
{
type fixedValue;
value uniform (0 0 0);
}
topAir_to_rightSolid
{
type fixedValue;
value uniform (0 0 0);
} }
} }
} }
T T
{ {
internalField uniform 300;
boundaryField boundaryField
{ {
".*"
{
type zeroGradient;
}
minX minX
{ {
type fixedValue; type fixedValue;
value uniform 300; value uniform 300;
} }
topAir_to_leftSolid maxX
{ {
type compressible::turbulentTemperatureCoupledBaffle; type inletOutlet;
neighbourFieldName T; inletValue uniform 300;
K K;
value uniform 300; value uniform 300;
}
} "topAir_to_.*"
topAir_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
topAir_to_rightSolid
{ {
type compressible::turbulentTemperatureCoupledBaffle; type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T; neighbourFieldName T;
@ -112,10 +113,16 @@ dictionaryReplacement
epsilon epsilon
{ {
// Set the value on all bc to non-zero. Not used in simulation internalField uniform 0.01;
// since zeroGradient; only used in initialisation.
boundaryField boundaryField
{ {
".*"
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
minX minX
{ {
type fixedValue; type fixedValue;
@ -123,44 +130,8 @@ dictionaryReplacement
} }
maxX maxX
{ {
type zeroGradient; type inletOutlet;
value uniform 0.01; inletValue uniform 0.01;
}
minY
{
type zeroGradient;
value uniform 0.01;
}
maxY
{
type zeroGradient;
value uniform 0.01;
}
minZ
{
type zeroGradient;
value uniform 0.01;
}
maxZ
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_leftSolid
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_heater
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_rightSolid
{
type zeroGradient;
value uniform 0.01; value uniform 0.01;
} }
} }
@ -169,55 +140,24 @@ dictionaryReplacement
k k
{ {
internalField uniform 0.1; internalField uniform 0.1;
boundaryField boundaryField
{ {
".*"
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
minX minX
{ {
type fixedValue; type fixedValue;
value uniform 0.1; value uniform 0.1;
} }
maxX maxX
{ {
type zeroGradient; type inletOutlet;
value uniform 0.1; inletValue uniform 0.1;
}
minY
{
type zeroGradient;
value uniform 0.1;
}
maxY
{
type zeroGradient;
value uniform 0.1;
}
minZ
{
type zeroGradient;
value uniform 0.1;
}
maxZ
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_leftSolid
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_heater
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_rightSolid
{
type zeroGradient;
value uniform 0.1; value uniform 0.1;
} }
} }
@ -225,59 +165,23 @@ dictionaryReplacement
p p
{ {
internalField uniform 1E5; internalField uniform 100000;
boundaryField boundaryField
{ {
minX ".*"
{ {
type buoyantPressure; type buoyantPressure;
value 1e5; value 1e5;
} }
maxX maxX
{ {
type waveTransmissive; type waveTransmissive;
//field p; gamma 1.4;
phi phi; fieldInf 100000;
rho rho; lInf 0.4;
psi psi; value uniform 100000;
gamma 1.4; // cp/cv
fieldInf 1e5;
lInf 0.40; // double length of domain
value uniform 1e5;
}
minY
{
type buoyantPressure;
value 1e5;
}
minZ
{
type buoyantPressure;
value 1e5;
}
maxZ
{
type buoyantPressure;
value 1e5;
}
topAir_to_leftSolid
{
type buoyantPressure;
value 1e5;
}
topAir_to_heater
{
type buoyantPressure;
value 1e5;
}
topAir_to_rightSolid
{
type buoyantPressure;
value 1e5;
} }
} }
} }