fvOptions: Separate options for all cells, cellSets and inter-region coupling
by introducing rational base-classes rather than using the hideous 'switch' statement. Further rationalization of the cell-selection mechanism will be implemented via an appropriate class hierarchy to replace the remaining 'switch' statement. Mesh-motion is currently handled very inefficiently for cellSets and not at all for inter-region coupling. The former will be improved when the cell-selection classes are written and the latter by making the meshToMesh class a MeshObject after it has been corrected for mapFields.
This commit is contained in:
@ -18,12 +18,13 @@ FoamFile
|
||||
porosity1
|
||||
{
|
||||
type explicitPorositySource;
|
||||
active true;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
active yes;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
|
||||
@ -18,12 +18,13 @@ FoamFile
|
||||
porosity1
|
||||
{
|
||||
type explicitPorositySource;
|
||||
active true;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
active yes;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
|
||||
@ -20,24 +20,28 @@ FoamFile
|
||||
front
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 700;
|
||||
startFace 63400;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 700;
|
||||
startFace 64100;
|
||||
}
|
||||
wall
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 1400;
|
||||
startFace 64800;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 1600;
|
||||
startFace 66200;
|
||||
}
|
||||
|
||||
@ -19,11 +19,12 @@ porosity1
|
||||
{
|
||||
type explicitPorositySource;
|
||||
active yes;
|
||||
selectionMode cellZone;
|
||||
cellZone stator;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone stator;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
|
||||
@ -20,24 +20,28 @@ FoamFile
|
||||
rotor
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 192;
|
||||
startFace 5952;
|
||||
}
|
||||
stator
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 192;
|
||||
startFace 6144;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
inGroups 1(empty);
|
||||
nFaces 3072;
|
||||
startFace 6336;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
inGroups 1(empty);
|
||||
nFaces 3072;
|
||||
startFace 9408;
|
||||
}
|
||||
|
||||
@ -18,12 +18,13 @@ FoamFile
|
||||
porosity1
|
||||
{
|
||||
type explicitPorositySource;
|
||||
active true;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
active yes;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
|
||||
@ -18,12 +18,13 @@ FoamFile
|
||||
source1
|
||||
{
|
||||
type fixedTemperatureConstraint;
|
||||
active true;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
active yes;
|
||||
|
||||
fixedTemperatureConstraintCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
mode uniform;
|
||||
temperature 350;
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
format binary;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
|
||||
@ -18,12 +18,12 @@ FoamFile
|
||||
fixedTemperaure1
|
||||
{
|
||||
type fixedTemperatureConstraint;
|
||||
active true;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
active yes;
|
||||
|
||||
fixedTemperatureConstraintCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
mode uniform;
|
||||
temperature 350;
|
||||
}
|
||||
@ -33,12 +33,12 @@ fixedTemperaure1
|
||||
porosity1
|
||||
{
|
||||
type explicitPorositySource;
|
||||
active true;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
active yes;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
type fixedCoeff;
|
||||
active yes;
|
||||
cellZone porosity;
|
||||
|
||||
@ -18,14 +18,14 @@ FoamFile
|
||||
airToporous
|
||||
{
|
||||
type constantHeatTransfer;
|
||||
active on;
|
||||
selectionMode mapRegion;
|
||||
interpolationMethod cellVolumeWeight;
|
||||
nbrRegionName porous;
|
||||
master false;
|
||||
active yes;
|
||||
|
||||
constantHeatTransferCoeffs
|
||||
{
|
||||
interpolationMethod cellVolumeWeight;
|
||||
nbrRegionName porous;
|
||||
master false;
|
||||
|
||||
nbrModelName porousToair;
|
||||
fieldNames (h);
|
||||
semiImplicit no;
|
||||
@ -35,13 +35,13 @@ airToporous
|
||||
porosityBlockage
|
||||
{
|
||||
type interRegionExplicitPorositySource;
|
||||
active on;
|
||||
selectionMode mapRegion;
|
||||
interpolationMethod cellVolumeWeight;
|
||||
nbrRegionName porous;
|
||||
active yes;
|
||||
|
||||
interRegionExplicitPorositySourceCoeffs
|
||||
{
|
||||
interpolationMethod cellVolumeWeight;
|
||||
nbrRegionName porous;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
|
||||
@ -18,18 +18,19 @@ FoamFile
|
||||
porousToair
|
||||
{
|
||||
type constantHeatTransfer;
|
||||
active on;
|
||||
selectionMode mapRegion;
|
||||
interpolationMethod cellVolumeWeight;
|
||||
nbrRegionName air;
|
||||
master true;
|
||||
active yes;
|
||||
|
||||
constantHeatTransferCoeffs
|
||||
{
|
||||
interpolationMethod cellVolumeWeight;
|
||||
nbrRegionName air;
|
||||
master true;
|
||||
|
||||
nbrModelName airToporous;
|
||||
fieldNames (h);
|
||||
semiImplicit no;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -18,13 +18,14 @@ FoamFile
|
||||
momentumSource
|
||||
{
|
||||
type pressureGradientExplicitSource;
|
||||
active on; //on/off switch
|
||||
selectionMode all; //cellSet // points //cellZone
|
||||
active yes;
|
||||
|
||||
pressureGradientExplicitSourceCoeffs
|
||||
{
|
||||
fieldNames (U);
|
||||
Ubar ( 0.1335 0 0 );
|
||||
selectionMode all;
|
||||
|
||||
fieldNames (U);
|
||||
Ubar (0.1335 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -18,18 +18,19 @@ FoamFile
|
||||
disk1
|
||||
{
|
||||
type actuationDiskSource;
|
||||
active on; //on/off switch
|
||||
selectionMode cellSet; //cellSet // points //cellZone
|
||||
cellSet actuationDisk1;//cellSet name when selectionMode = cellSet
|
||||
active on;
|
||||
|
||||
actuationDiskSourceCoeffs
|
||||
{
|
||||
fieldNames (U);
|
||||
diskDir (1 0 0); // orientation of the disk
|
||||
Cp 0.386; // Cp
|
||||
Ct 0.58; // Ct
|
||||
diskArea 40; // disk area
|
||||
upstreamPoint (581849 4785810 1065);
|
||||
fieldNames (U);
|
||||
|
||||
selectionMode cellSet;
|
||||
cellSet actuationDisk1;
|
||||
diskDir (1 0 0); // Orientation of the disk
|
||||
Cp 0.386;
|
||||
Ct 0.58;
|
||||
diskArea 40;
|
||||
upstreamPoint (581849 4785810 1065);
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,18 +38,20 @@ disk2
|
||||
{
|
||||
type actuationDiskSource;
|
||||
active on;
|
||||
selectionMode cellSet;
|
||||
cellSet actuationDisk2;
|
||||
|
||||
actuationDiskSourceCoeffs
|
||||
{
|
||||
fieldNames (U);
|
||||
diskDir (1 0 0);
|
||||
Cp 0.53;
|
||||
Ct 0.58;
|
||||
diskArea 40;
|
||||
upstreamPoint (581753 4785663 1070);
|
||||
fieldNames (U);
|
||||
|
||||
selectionMode cellSet;
|
||||
cellSet actuationDisk2;
|
||||
diskDir (1 0 0); // Orientation of the disk
|
||||
Cp 0.53;
|
||||
Ct 0.58;
|
||||
diskArea 40;
|
||||
upstreamPoint (581753 4785663 1070);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -18,14 +18,15 @@ FoamFile
|
||||
source1
|
||||
{
|
||||
type fixedTemperatureConstraint;
|
||||
active true;
|
||||
timeStart 0.1;
|
||||
duration 0.4;
|
||||
selectionMode cellSet;
|
||||
cellSet ignitionCells;
|
||||
active yes;
|
||||
|
||||
fixedTemperatureConstraintCoeffs
|
||||
{
|
||||
timeStart 0.1;
|
||||
duration 0.4;
|
||||
selectionMode cellSet;
|
||||
cellSet ignitionCells;
|
||||
|
||||
mode uniform;
|
||||
temperature 2000;
|
||||
}
|
||||
|
||||
@ -18,12 +18,13 @@ FoamFile
|
||||
filter1
|
||||
{
|
||||
type explicitPorositySource;
|
||||
selectionMode cellZone;
|
||||
cellZone filter;
|
||||
active true;
|
||||
active yes;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone filter;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
@ -50,17 +51,18 @@ filter1
|
||||
massSource1
|
||||
{
|
||||
type scalarSemiImplicitSource;
|
||||
active true;
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
active yes;
|
||||
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
|
||||
volumeMode absolute;
|
||||
injectionRateSuSp
|
||||
{
|
||||
@ -74,17 +76,18 @@ massSource1
|
||||
momentumSource1
|
||||
{
|
||||
type vectorSemiImplicitSource;
|
||||
active true;
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
active yes;
|
||||
|
||||
vectorSemiImplicitSourceCoeffs
|
||||
{
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
|
||||
volumeMode absolute;
|
||||
injectionRateSuSp
|
||||
{
|
||||
@ -97,17 +100,18 @@ momentumSource1
|
||||
energySource1
|
||||
{
|
||||
type scalarSemiImplicitSource;
|
||||
active true;
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
active yes;
|
||||
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
|
||||
volumeMode absolute;
|
||||
injectionRateSuSp
|
||||
{
|
||||
|
||||
@ -18,12 +18,13 @@ FoamFile
|
||||
porosity1
|
||||
{
|
||||
type explicitPorositySource;
|
||||
active true;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
active yes;
|
||||
|
||||
explicitPorositySourceCoeffs
|
||||
{
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
type DarcyForchheimer;
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
|
||||
@ -22,13 +22,8 @@ boundaryField
|
||||
{
|
||||
outlet
|
||||
{
|
||||
type totalPressure;
|
||||
p0 $internalField;
|
||||
U U.air;
|
||||
phi phi.air;
|
||||
rho thermo:rho.air;
|
||||
psi none;
|
||||
gamma 1;
|
||||
type prghPressure;
|
||||
p $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
||||
@ -17,8 +17,7 @@ FoamFile
|
||||
|
||||
injector1
|
||||
{
|
||||
active true;
|
||||
timeStart 0;
|
||||
timeStart 0.1;
|
||||
duration 5;
|
||||
selectionMode points;
|
||||
points
|
||||
@ -32,10 +31,11 @@ options
|
||||
massSource1
|
||||
{
|
||||
type scalarSemiImplicitSource;
|
||||
$injector1;
|
||||
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
$injector1;
|
||||
|
||||
volumeMode absolute;
|
||||
injectionRateSuSp
|
||||
{
|
||||
@ -47,10 +47,11 @@ options
|
||||
momentumSource1
|
||||
{
|
||||
type vectorSemiImplicitSource;
|
||||
$injector1;
|
||||
|
||||
vectorSemiImplicitSourceCoeffs
|
||||
{
|
||||
$injector1;
|
||||
|
||||
volumeMode absolute;
|
||||
injectionRateSuSp
|
||||
{
|
||||
@ -62,10 +63,11 @@ options
|
||||
energySource1
|
||||
{
|
||||
type scalarSemiImplicitSource;
|
||||
$injector1;
|
||||
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
$injector1;
|
||||
|
||||
volumeMode absolute;
|
||||
injectionRateSuSp
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user