3.8. Initial and Boundary Conditions
Last updated
Was this helpful?
Last updated
Was this helpful?
GASFLOW-MPI solves the Navier-Stokes equations of motion and the energy conservation equations for a fluid in a specified computational domain. The governing equations are time dependent, partial differential equations. To complete the mathematical formulation, we must specify initial and boundary conditions.
Function: to run a calculation (except for a restart run), the user must define the initial pressure, temperature, and composition of the fluid everywhere in the computational domain.
Input Array: variable gasdef in NAMELIST group xput. For each gasdef specification, there are a minimum of 14 numbers required, which are input through the elements of the first array dimension with the following meaning:
Variables gasdef(15,*) and beyond are only necessary if the user wants to define a fluid region of multiple gas species. Compositions of up to 23 gas species, 1 liquid component (water liquid), and 1 solid component (carbon soot) may be defined.
Note that at least one definition of gasdef is required to fully specify the initial fluid conditions.
For specification of initial conditions, the beginning and end time should both be set to 0. Consider the following input:
mat = 'h2o', 'air',
gasdef(1:40,1) = 1, 6, 1, 6, 1, 6, 1, 1.013e6, 298.,2, 0., 0., 'air', 0.9, 'h2o', 0.1, ..., ;
The fluid is initially composed of 10% water vapor and 90% air by volume at room temperature and atmospheric pressure.
When gasdef(10,*) is greater than 9, GASFLOW-MPI will use time-dependent functions for the pressure and temperature for the cells specified in the gasdef definition. The function type is determined by the ten’s digit in the gasdef(10,*) input. The constants to be used in the function are determined from the hundreds digit in the gasdef(10,*) input. The one’s digit for gasdef(10,*) is still used as the option flag to indicate whether the input for species is volume fraction or mass fraction.
Example. gasdef(10,*) = 321
The 1 in the one’s place indicates species concentrations will be input as a mass fraction. The 2 in the ten’s place indicates a function type of 2 (see list below), and the 3 in the hundred’s place indicates that the constants in function type 2 will be obtained from pfunc(*,3) and tfunc(*,3).
If gasdef(10,*) is greater than 9, let the ten’s digit in gasdef(10,*) be ifunc and the hundred’s digit in gasdef(10,*) be icons. Then the following function types are available for the pressure and temperature, and the constants in these functions are determined from gasdef(8,*), gasdef(9,*), pfunc(*,icons), and tfunc(*,icons).
The user has available the following sets of constants for the functions defined above:
For time-dependent table, linear interpolation is performed between points in the table.
For initial fluid velocities, default is that the fluid is initially at rest everywhere in the mesh. However, the user can change the default by setting a constant value for each component of the velocity vector. Then the code will set the initial fluid velocity everywhere in the mesh according to the specified component values. The input variables for defining initial velocity components, in NAMELIST group xput, are
ui Initial fluid velocity in i- (x- or r-) direction, cm/s.
vi Initial fluid velocity in j- (y- or θ-) direction, cm/s.
wi Initial fluid velocity in k- (z-) direction, cm/s.
GASFLOW-MPI offers two methods, one “global” and the other “local,” for specifying boundary conditions. These two methods will be described separately.
The first method applies boundary conditions on entire boundaries of the computational domain of all 3D blocks. For each 3D block, there are six surfaces that bound the three-dimensional mesh discretized by logical indices (i,j,k).
The input variables in the NAMELIST xput group are listed below:
ibe Boundary condition type indicator for the +i (east) boundary.
ibw Boundary condition type indicator for the -i (west) boundary.
ibs Boundary condition type indicator for the -j (south) boundary.
ibn Boundary condition type indicator for the +j (north) boundary.
ibb Boundary condition type indicator for the -k (bottom) boundary.
ibt Boundary condition type indicator for the +k (top) boundary.
The boundary conditions on these six boundaries can be specified according to the following key:
1
Rigid free-slip wall
2
Rigid no-slip wall
3
Continuative
4
Periodic
5
Specific pressure
Rigid Free-slip. The default boundary condition is Type 1. Therefore, if no boundary conditions are specified, the code will assume that the entire computational volume is enclosed within rigid, impenetrable walls at which there is free slip, or the gradient of the tangential velocity components is zero.
Rigid No-slip. The no-slip condition, Type 2, is another option with which the user can define a boundary as an impenetrable surface. No slip means that the fluid “sticks” to the solid wall and all velocity components are zero there. This boundary condition is used in problems where the velocity gradients near solid surfaces are important, and the mesh is sufficiently fine to resolve them.
Wall Functions. When rigid no-slip conditions are specified and turbulence is activated, the user may wish to use wall functions rather than resolving the boundary layers. The options are as follows:
iwallfunc = 0 ; default value, no wall functions are active.
iwallfunc = 1 ; no-slip conditions must to active, assumes smooth walls.
iwallfunc = 2 ; no-slip conditions must to active, assumes rough walls and krough must be specified.
Continuative. Type 3 is the continuative boundary condition. This condition is usually applied at outflow boundaries, where the fluid is to flow smoothly out of the mesh, causing minimum upstream effects. With this boundary condition, the gradients of pressure, internal energy, density, velocity, etc., across the specified boundary are set to zero.
Periodic. The periodic boundary condition, Type 4, specifies that the fluid conditions at the beginning and ending boundaries in a particular direction are identical. Periodic boundaries must be specified in pairs, i. e., both the + and - boundaries must be specified as periodic. This condition is most commonly used for defining the θ-boundaries when the mesh covers the full 360˚ in the azimuthal direction. Therefore, if cylindrical coordinates are chosen and the mesh is defined to extend from 0˚ to 360˚, then the following input should be used to specify the appropriate boundary condition at the -θ (-j) and +θ (+j) boundaries:
ibs = 4,
ibn = 4
Specified Pressure. The pressure boundary condition, Type 5, specifies the fluid pressure at a particular boundary. The pressure value at the boundary will be that of the fluid in the adjacent fictitious boundary cells. Therefore, for complete specification of the pressure boundary condition, the input array gasdef must also be used to give a pressure value in the boundary cells adjacent to the boundary surface. Consider a problem in which imax = 11, jmax = kmax = 7. To define a pressure boundary condition at the +i boundary of 1 bar , the user would write the following input:
ibe = 5,
gasdef(1:40,1) = 10, 11, 1, 7, 1, 7, 1, 1.e6, 300., 1, 0., 9.e99, 1, 1, ... , ;
The second method of specifying boundary conditions complements the first method by allowing flexibility in imposing the boundary conditions at arbitrary parts of the mesh and within arbitrary time intervals. This method is capable of imposing boundary conditions on selective surfaces, which can be external or internal, over a specified time range.
Note that the vbc, pbc, cbc, and mbc boundary conditions can only currently be applied to the extreme surfaces of the mesh in each direction. However, only four of the five types of boundary conditions discussed above can be specified with this local method. This method is also used to specify velocity boundary conditions, which cannot be done with the first method.
Free-Slip and No-Slip walls. Since any impenetrable surface is free-slip by default, there is no need to explicitly request this boundary option. However, the default free-slip condition can be changed to no-slip via the nslipdef variable, which requires 8 entries per definition:
nslipdef can also be used to specify that all faces of an obstacle volume be no-slip. To do this the user has to set nslipdef(8,*) to 'both', and specifies the beginning and ending mesh indices that define the volume occupied by the obstacle.
Continuative. The continuative boundary condition can be specified via the variable cbc, which requires 9 numbers per definition:
cbc(1,*) Beginning i mesh index (cell face number).
cbc(2,*) Ending i mesh index (cell face number).
cbc(3,*) Beginning j mesh index (cell face number).
cbc(4,*) Ending j mesh index (cell face number).
cbc(5,*) Beginning k mesh index (cell face number).
cbc(6,*) Ending k mesh index (cell face number).
cbc(7,*) Block number (must be 1 for GASFLOW-MPI).
cbc(8,*) Start time(s)
cbc(9,*) End time(s)
For example, the following input:
cbc(1:9,1) = 21, 21, 1, 15, 1, 15, 1, 0.0, 9.e99,
will specify that the boundary i = 21 has a continuative boundary condition, i. e., gradients of pressure, density, etc., across the boundary are zero. Because of the large end time, which exceeds practically all physical problem time, this boundary condition is effective throughout the calculation.
Pressure. The specified pressure boundary condition can be invoked with the input variable pbc:
pbc(1,*) Beginning i mesh index (cell face number).
pbc(2,*) Ending i mesh index (cell face number).
pbc(3,*) Beginning j mesh index (cell face number).
pbc(4,*) Ending j mesh index (cell face number).
pbc(5,*) Beginning k mesh index (cell face number).
pbc(6,*) Ending k mesh index (cell face number).
pbc(7,*) Block number.
pbc(8,*) Start time(s).
pbc(9,*) End time(s).
Similar to the first method, the values of pressure to be specified at the boundary are taken from the fictitious boundary cells, the fluid conditions of which must be defined with gasdef.
Velocity. The input variable vbc can be used to specify velocity boundary conditions. Each definition requires 10 numbers:
vbc(1,*) Beginning i mesh index (cell face number).
vbc(2,*) Ending i mesh index (cell face number).
vbc(3,*) Beginning j mesh index (cell face number).
vbc(4,*) Ending j mesh index (cell face number).
vbc(5,*) Beginning k mesh index (cell face number).
vbc(6,*) Ending k mesh index (cell face number).
vbc(7,*) Block number (must be 1 for GASFLOW-MPI)
vbc(8,*) If vbc(8,*) < 100, then vbc(8,*) is the index in the vvalue array that will define a constant velocity from the start time to the end time for the vbc definition. If vbc(8,*) > 100, then vbc(8,*) points to a time-dependent function which will be used to determine the velocity as a function of time.
vbc(9,*) Start time(s)
vbc(10,*) End time(s)
Note that the input array vvalue stores velocity values.
Example
vbc(1:10,1)= 1, 1, 1, 7, 1, 7, 1, 3, 1.0, 2.0,
vbc(1:10,2)= 1, 1, 1, 7, 1, 7, 1, 2, 2.0, 5.0,
vbc(1:19,3)= 10, 10, 1, 7, 1, 7, 1, 2, 2.0, 5.0,
gasdef(1:40,8)= 0, 1, 1, 7, 1, 7, 1, 1.0132e6, 298.0, 2, 0., 9.e99, 1, 1.,
vvalue= 10., 30., 50., 20.
The first two vbc definitions specify a velocity of 50 cm/s during the time interval between 1 and 2 s, followed by a lower velocity of 30 cm/s from 2 to 5 s at the -i boundary. The third vbc definition specifies a velocity of 30 cm/s during the time interval between 2 and 5 s at the +i boundary. Because these velocities are positive, the boundary condition at the -i boundary represents an inflow condition, whereas that at the +i boundary represents an outflow condition.
If vbc(8,*) is larger than 100, then a time-dependent function for the velocity boundary condition will be specified. When vbc(8,*) is larger than 100, then the one’s digit (let the one’s digit be ivv) points to the value in the vvalue array to be used for the time = 0.0 constant in the velocity time-dependent functions; the ten’s digit (let the ten’s digit be ifunc) is the function type; and the hundred’s digit (let the hundred’s digit be icons) points to the constants to be used in the vfunc constants table.
where
For time-dependent velocity boundary conditions, the user must either supply a table of constants (i.e., vfunc) if ifunc is not equal to 5 or a table of x-y pairs (i.e., vtab) if ifunc is equal to 5.
vfunc(4,maxtb) Sets of constants for velocity boundary condition functions.
vtab(2,maxp,9) Set of x-y pair tables that define velocity boundary condition functions.
Note that with a parameter statement in GASFLOW-MPI, maxp (i.e., the maximum number of points in a table) is currently set to 20 and maxtb (i.e., the maximum number of tables) is set to 20.
Mass Flow Rate. The input variable mbc can be used to specify mass flow rate boundary conditions. The actual velocity used as the boundary condition is determined from the user-supplied mass flow rate, the donor cell density, and the flow area of the cell edge where the boundary condition is to be supplied, calculated according to the following formula:
vbc=mbc/(ρA) where ρ is the Donor cell density and A is the Flow area
Each mbc definition requires 10 numbers:
mbc(1,*) Beginning i mesh index (cell face number).
mbc(2,*) Ending i mesh index (cell face number).
mbc(3,*) Beginning j mesh index (cell face number).
mbc(4,*) Ending j mesh index (cell face number).
mbc(5,*) Beginning k mesh index (cell face number).
mbc(6,*) Ending k mesh index (cell face number).
mbc(7,*) Block number (must be 1 for GASFLOW-MPI)
mbc(8,*) If mbc(8,*) < 100, then mbc(8,*) is the index in the mvalue array that will define a constant mass flow rate from the start time to the end time for the mbc definition. If mbc(8,*) > 100, then mbc(8,*) points to a time-dependent function mfunc which will be used to determine the mass flow rate as a function of time.
mbc(9,*) Start time(s)
mbc(10,*) End time(s)
The examples for vbc and vvalue are equivalent to mbc and mvalue with vbc replaced by mbc and vvalue replaced by mvalue.
If mbc(8,*) is larger than 100, then a time-dependent function for the mass flow rate boundary condition will be specified. When mbc(8*,) is larger than 100, then the one’s digit (let the one’s digit be imv) points to the value in the mvalue array to be used for the time = 0.0 constant in the velocity time-dependent functions; the ten’s digit (let the ten’s digit be ifunc) is the function type; and the hundred’s digit (let the hundred’s digit be icons) points to the constants to be used in the mfunc constants table. The function types available for mass flow rate boundary conditions are the same as for the pressure and temperature functions defined in a time-dependent gasdef definition and for the time-dependent velocity defined in the vbc array.
For time-dependent mass flow rate boundary conditions, the user must either supply a table of constants (i.e., mfunc) if ifunc is not equal to 5, or a table of x-y pairs (i.e., mtab) if ifunc is equal to 5.
mfunc(4,maxtb) Sets of constants for mass flow rate boundary condition functions.
mtab(2,maxp,9) Set of x-y pair tables that define mass flow rate boundary condition functions.
Function: defining internal boundary conditions to represent the sources of mass, momentum, and energy within the boundaries of the computational mesh.
Example
The figure above will be used to this example (see 3.5.4. Holes). We have to define two additional input quantities. The first is used to subtract from the mass and energy balance the mass and energy from the reservoir volume. This can be accomplished via the input array variable subsodef (two-dimensional array) in NAMELIST group xput. The second index identifies the particular "reservoir volume". For each subsodef specification, there are seven numbers required, which are input through the elements of the first array dimension with the following meaning:
subsodef(1,*) Beginning i mesh index (cell face number).
subsodef(2,*) Ending i mesh index (cell face number).
subsodef(3,*) Beginning j mesh index (cell face number).
subsodef(4,*) Ending j mesh index (cell face number).
subsodef(5,*) Beginning k mesh index (cell face number).
subsodef(6,*) Ending k mesh index (cell face number).
subsodef(7,*) Block number (must be 1 for GASFLOW-MPI)
To prevent nondesired diffusion of gases from the reservoir into the computing region of interest and the reverse process as well, we introduce a method of forcing all diffusion coefficients at the reservoir boundary to zero. We define a surface normal to any of the three orthogonal dimensions with logical indices i, j, and k. This is done via the input array variable zeroddef in the NAMELIST group xput. The array zeroddef is 2D with the second index identifying the particular surface definition and the first index specifying seven numbers that are required to define the zeroddef surface:
zeroddef(1,*) Beginning i mesh index (cell face number).
zeroddef(2,*) Ending i mesh index (cell face number).
zeroddef(3,*) Beginning j mesh index (cell face number).
zeroddef(4,*) Ending j mesh index (cell face number).
zeroddef(5,*) Beginning k mesh index (cell face number).
zeroddef(6,*) Ending k mesh index (cell face number).
zeroddef(7,*) Block number (must be 1 for GASFLOW-MPI)
GASFLOW-MPI supports 300 definitions each for subsodef and zeroddef.
The reservoir is located at cell i=8, j=6, k=10, and walls are constructed around the reservoir such that it is open in the positive x direction. An air mixture of nitrogen and oxygen at 1 bar and 300 K is established throughout the entire computational volume as an initial condition. The reservoir is filled with hydrogen also at 1 bar and 300 K and will remain at that condition for 10 s. Hydrogen from the reservoir is injected into the computational volume at 100 cm/s for a period of 10 s.
The mass and energy of the reservoir is subtracted from the overall mass and energy balance using the subsodef input variable. Diffusion of hydrogen from the reservoir and nitrogen and oxygen into the reservoir is prohibited by the use of the zeroddef input variable. The input stream is shown here:
$xput
...
mobs(1:8,1) = 3, 10, 1, 11, 5, 8, 1, 1, ; Solid obstacle
walls(1:8,1) = 2, 10, 1, 11, 3, 3, 1, 2, ; Horizontal wall
walls(1:8,2) = 2, 2, 1, 11, 6, 10, 1, 2, ; Vertical wall
walls(1:8,3) = 7, 8, 5, 6, 10, 10, 1, 2, ; reservoir top wall
walls(1:8,4)=7, 8, 5, 6, 9, 9, 1, 2, ; reservoir bottom wall
walls(1:8,5)=7, 8, 5, 5, 9, 10, 1, 2, ; reservoir south wall
walls(1:8,6)=7, 8, 6, 6, 9, 10, 1, 2, ; reservoir north wall
walls(1:8,7)=7, 7, 5, 6, 9, 10, 1, 2, ; reservoir north wall
holes(1:13,1) = 5, 7, 4, 7, 6, 8, 1, 0, 0, 0, 0, 0, 1, ; top hole
holes(1:13,2) = 8, 9, 5, 6, 5, 8, 1, 0, 0, 0, 0, 1, 1, ; thru hole
holes(1:13,3) = 8, 9, 5, 6, 2, 4, 1, 1, 1, 1, 1, 1, 1, ; wall hole
mat = 'h2', 'n2', 'o2', ; problem components
gasdef(1:16,1)= 1, 11, 1, 11, 1, 11, 1, 1.0e+06, 300.0, 2, 0.0, 0.0, 'n2', 0.79, 'o2', 0.21, ; initial conditions
gasdef(1:14,2)= 7, 8, 5, 6, 9, 10, 1, 1.0e+06, 300.0, 2, 0.0, 10.0, 'h2', 1.00, ; reservoir conditions
vbc(1:10,1)= 8, 8, 5, 6, 9, 10, 1, 1, 0.0,10.0, ; reservoir U
vvalue=100, ; reservoir inflow velocity value (cm/s)
subsodef(1:7,1)=7, 8, 5, 6, 9,10, 1, ; subtract mass & energy
zeroddef(1:7,1)=8, 8, 5, 6, 9,10, 1, ; zero reservoir diffusion
...
$end
What is a SORTAM file? The SORTAM file is a table of velocities, mass flow rates, and/or volumetric flow rates that can be applied at different locations in the GASFLOW-MPI mesh. The SORTAM velocities, mass flow rates, and/or volumetric flow rates can be applied at the boundaries of the mesh or at the boundary of an internal mass, momentum, and energy source described in the latter Section.
The element in the vvalue array referenced by the vbc array will be changed with time according to the input in the SORTAM file. GASFLOW-MPI expects a SORTAM file if sortami is 1 in the xput NAMELIST group. The format of the SORTAM file is described below.
A partial listing of a SORTAM file is given below:
The first three columns of data will be used to set vvalue(1), vvalue(2), and vvalue(3), respectively as a function of time. The fourth column of data will be used to set vvalue(5) as a function of time. To find flow rates for time between time points given in the table, linear interpolation is used.
For mass flow rate and volumetric flow rate to be converted to velocity requires a flow area. The flow area is determined from the vbc input that refers to the identified for a given column of data in the SORTAM file. For example, the vbc input given below
vbc(1:10,1) = 08, 10, 08, 10, 09, 09, 1, 1, 0., 1.e+99,
vbc(1:10,2)= 08, 10, 08, 10, 04, 04, 1, 2, 0., 1.e+99,
vbc(1:10,3) = 08, 10, 16, 18, 04, 04, 1, 3, 0., 1.e+99,
vbc(1:10,4) = 04, 04, 15, 26, 3, 4, 1, 5, 0., 1.e+99,
and the SORTAM file given above would result in the flow area to be used for the conversion of the first column of mass flow rates to velocity, defined by the z-direction flow area on the top face of the following i, j, k cells:
The density required to convert the mass flow rate to a velocity will be obtained from the cell identified in the vbc input as the last i, j, k cell in the vbc definition. For the example given above, the last cell in the vbc definition is at i=10, j=10, k=9. The gas species convected into the GASFLOW mesh by the SORTAM flow rate boundary conditions will be of the normal donor cell densities and species.
It is convenient at times to have a means of executing of GASFLOW-MPI using an applied time shifting algorithm to the SORTAM file. This has been implemented as
tshift_sortam = 0.0 (default)
tshift_sortam > 0.0 (any positive floating point value to shift the execution of the SORTAM file)
which is read by GASFLOW-MPI in the xput into stream.
Please be cautioned that this time shift only applies to the SORTAM file and does not apply to any other time dependent input variables.
The execution time can slow significantly when using the SORTAM input file when this file has many piece wise continuous segments.
When the XPUT namelist input variable sortami = 1, the time step is adjusted to coincide exactly with the end points of the piece wise continuous intervals. This often leads to a severe reduction in the time-step for no other reason than to meet the intervals specified by the SORTAM file.A sawtooth behavior can result in the time step as the sudden reduction occurs, often several orders of magnitude less than necessary, and then the recovery until the end of the next interval is reached. In the figure below is shown an example of that behavior.
If sortami=2 in the xput NAMELIST input, GASFLOW-MPI will ignore the end of the intervals as shown in the latter figure by the dashed lines, but it could induce some error.
The SORTAM File is often used by GASFLOW to incorporate complicated time dependent source term data.
For example, a typical SORTAM file can appear as shown below.
The left most column is the time in seconds. Each of the numbered columns are:
#1 Pressure in dynes/cm2,
#2 Temperature in degrees Kelvin,
#3 Mass flow rate in g/s,
#4 Water vapor mass fraction of the mass flow rate,
#3*#5 Water liquid mass fraction of the mass flow rate,
#3*#6 Hydrogen mass fraction of the mass flow rate,
#3*#7 Xenon mass fraction of the mass flow rate.
The corresponding gasdef input statement is:
gasdef(1:24,2) = 32, 35, 39, 42, 7, 8, 1, -1, -2, 1, 0.0, 1e+99, 'n2', 0.0, 'o2', 0.0, 'h2', -6, 'h2o', -4, 'h2ol', -5, 'xenon', -7, ;
This SORTAM and gasdef statement are from the input for a reactor containment analysis.
In order to generalize the use of the SORTAM file to multiple sources, we must relate which mass fraction columns correspond to what total mass flow rate column. Therefore, we have modified the gasdef input when a SORTAM File is to be read in the following way:
gasdef(1:24,2) = 32, 35, 39, 42, 7, 8, 1, -1, -2, 1, 0., 1.e+99, 'n2', 0.0, 'o2', 0.0, 'h2', -306, 'h2o', -304, 'h2ol', -305, 'xenon', -307, ;
Note that when either the species mass fraction or volume fraction is to be obtained from a specific column of the SORTAM file, the entry is always < -100. This allows, for example the hydrogen mass fraction in this example to be associated with the total mass fraction of column
INT(ABS(gasdef(18,2)/100)),
while the actual hydrogen mass fraction is
INT(ABS(gasdef(18,2)))-100*INT(ABS(gasdef(18,2)/100)).
When gasdef(18,2) = -306,
INT(ABS**(gasdef(18,2)**/100)) = 3, and
72 INT(ABS(gasdef(18,2)))-100*INT(ABS(gasdef(18,2)/100)) = 6.
Hence, the hydrogen mass fraction located in column 6 of the SORTAM File is associated with the total mass flow rate column 3.
It is often desirable to pre-calculate the expansion process and then use this pre-expanded source as the source.
In the following figure, we show the available two-phase pre-expansions in the classical temperature-entropy diagram for the conditions at time equal zero in the SORTAM file expanded to 1 bar containment pressure:
A-B: Isentropic (constant entropy),
A-C: Isenthalpic (constant enthalpy),
A-D: Isenergetic (constant internal energy).
We are mostly interested in the production of the vapor component during the expansion or flashing process. We can see that the least amount of vapor is produced by the isentropic expansion, while the maximum amount is produced by the isoenergetic process.
Into GASFLOW-MPI steam table data has been introduced. It can predict the mentioned expansion from saturation conditions of up to 200 bars (639 K) down to 0.01 bars (280 K)
The governing equation of the expansion is:
Where Φ is the desired expansion property. x is the quality or vapor mass fraction. The subscript A means that the value is evaluated in the point A, the subscript f,A means the saturated liquid values and fg,A means the difference between the saturated vapor and liquid values.
Expanding now to the second state at the containment pressure we have:
where the subscript i refers to the property associated with expansion A-B, A-C, or A-D.
The user can specify which expansion they want by using the tenth entry in the gasdef statement.
When using the pre-expansion option, it is assumed that the expansion will occur from the pressure specified in the sortam file, column #2 in the above example, to a value characteristic of the containment pressure. As written in the new users manual, |gasdef(8,*)| > 1,000,000, then it is a packed i, j, k, iblk location for a reference pressure located in cell i, j, k, iblk.
Since GASFLOW-MPI solves the internal energy equation as one of the primitive variable equations, it isn't too surprising to see that the results obtained with no pre-expansion (a natural expansion) and the isenergetic pre-expansion are nearly identical in the pressurization of the containment.
The rules for using SORTAM file are presented here, and several examples are presented below.
Rules for using SORTAM file for internal sources:
sortami: Flag of notification to signal GASFLOW to expect an input SORTAM file. - 0 (default): No SORTAM file expected - 1 SORTAM file expected with integration coinciding exactly with piece wise continuous segments. - 2 SORTAM file expected with integration independent of piece wise continuous segments.
walls: Define the volume within the computational mesh where the internal source is located, specify the direction of the inflow, and isolate all source cells from each other with non heat exchange walls. The input array variables are the same of the wall definition described in Geometry Definition (Section 3.5).
subsodef: Subtract mass and energy from the global mass and energy balances where the internal source is located. The input array is the same described in the Heading 2.3 of this Section.
zeroddef: Zero mass diffusion across all inflow surfaces. The input array is the same described in the Heading 2.3 of this Section.
gasdef: Define source thermodynamic state and relationship to the SORTAM file. The input array differs from the input array described in the Section 3.7 only for gasdef(10,*) described above.
vbc: Define the inflow surface for the internal source. The input array is the same described in this Section Heading 2.2. Note vbc(8,*), If ivvalues in SORTAM file is greater than zero, this flags the interaction with the SORTAM file and the vvalue location to provide a flow for an internal source. Then vvalue(vbc(8,*)) will be replaced by vvalue(ivvalues(n)) read from SORTAM file. vbc(8,*) has to be negative value for negative flow direction (-i, -j, -k ) and to be positive value for positive flow direction (+i,+j,+k). The same rule applies to source_fraction in SORTAM meaning source_fraction has to be negative value for negative flow direction and to be positive value for positive flow direction.
vvalue: Define the velocity on the inflow surface for the internal source.
A third input column has been added to the sortam file with the ivvalues - ivtypes input. This column is called the source_fraction and it refers to the fraction of that particular column (in both a positive and negative sense) inflowing through that ivvalue surface. The input FORMAT is (2i9,f9.4) for the ivvalues - ivtypes - source_fraction input.
EXAMPLE 1
This is an example showing 100% positive direction internal source inflow through a single surface. Note the last entry in the ivvalues - ivtypes - source_fraction input columns; the 1.0 indicates that 100% of the specified mass flow rate will be used for the vvalue(1) entry associated with vbc(1,1).
$xput
...
mat = 'n2', 'h2', 'h2o', 'h2ol',
gasdef(1:14,1)= 1, 'im1', 1, 'jm1', 1, 'km1', 1, 1.015e+06, 300.00, 2, 0., 0., 'n2', 1.0,
gasdef(1:14,2)= 6, 9, 6, 9, 7, 8, 1, -02020801, -2, 1, 0.0, 800.0, 'n2', 0.0, 'h2o', -603, 'h2ol', -604, 'h2', -605,
sortami = 2,
walls(1:8,1)= 6, 9, 6, 6, 7, 8, 1, 0,
walls(1:8,2)= 6, 9, 7, 7, 7, 8, 1, 0,
walls(1:8,3)= 6, 9, 8, 8, 7, 8, 1, 0,
walls(1:8,4)= 6, 9, 9, 9, 7, 8, 1, 0,
walls(1:8,5)= 6, 6, 6, 9, 7, 8, 1, 0,
walls(1:8,6)= 7, 7, 6, 9, 7, 8, 1, 0,
walls(1:8,7)= 8, 8, 6, 9, 7, 8, 1, 0,
walls(1:8,8)= 9, 9, 6, 9, 7, 8, 1, 0,
walls(1:8,9)= 6, 9, 6, 9, 7, 7, 1, 0,
subsodef(1:7,1) = 6, 9, 6, 9, 7, 8, 1,
zeroddef(1:7,1)= 6, 9, 6, 9, 8, 8, 1,
vbc(1:10,1)= 6, 9, 6, 9, 8, 8, 1, 1, 0.0, 800.0,
vvalue = 0.0,
...
$end
EXAMPLE 2
This is an example showing 100% positive direction internal source inflow through a single surface but instead of using a solid bottom on the source volume, we use zeroddef(1,2), vbc(1,2) and vvalue(2) to effectively provide a zero fluxing boundary condition. Note again that the last entry in the ivvalues - ivtypes - source_fraction input columns; the 1.0 indicates that 100% of the specified mass flow rate will be used for the vvalue(1) entry associated with vbc(1,1). The calculation is identical to Example 1.
The input differs from the Example 1 only for zeroddef(1:7,2), vbc(1:10,2) and vvalue that is a two dimension array.
$xput
...
mat = 'n2', 'h2', 'h2o', 'h2ol',
gasdef(1:14,1)= 1, 'im1', 1, 'jm1', 1, 'km1', 1, 1.015e+06, 300.00, 2, 0., 0., 'n2', 1.0,
gasdef(1:14,2)= 6, 9, 6, 9, 7, 8, 1, -02020801, -2, 1, 0.0, 800.0, 'n2', 0.0, 'h2o', -603, 'h2ol', -604, 'h2', -605,
sortami = 2,
walls(1:8,1)= 6, 9, 6, 6, 7, 8, 1, 0,
walls(1:8,2)= 6, 9, 7, 7, 7, 8, 1, 0,
walls(1:8,3)= 6, 9, 8, 8, 7, 8, 1, 0,
walls(1:8,4)= 6, 9, 9, 9, 7, 8, 1, 0,
walls(1:8,5)= 6, 6, 6, 9, 7, 8, 1, 0,
walls(1:8,6)= 7, 7, 6, 9, 7, 8, 1, 0,
walls(1:8,7)= 8, 8, 6, 9, 7, 8, 1, 0,
walls(1:8,8)= 9, 9, 6, 9, 7, 8, 1, 0,
walls(1:8,9)= 6, 9, 6, 9, 7, 7, 1, 0,
subsodef(1:7,1) = 6, 9, 6, 9, 7, 8, 1,
zeroddef(1:7,1)= 6, 9, 6, 9, 8, 8, 1,
zeroddef(1:7,2)=6, 9, 6, 9, 7, 7, 1,
vbc(1:10,1)= 6, 9, 6, 9, 8, 8, 1, 1, 0.0, 800.0,
vbc(1:10,2)=6, 9, 6, 9, 7, 7, 1, 2, 0.0, 800.0,
vvalue = 0.0, 0.0,
...
$end
EXAMPLE 3
This is an example showing 100% negative direction internal source inflow through a single surface but instead of using a solid top surface on the source volume, we use zeroddef(1,1), vbc(1,1) and vvalue(1) and the 6th column entry in the SORTAM file to effectively provide a top zero fluxing boundary condition. Note again that the last entry in the ivvalues - ivtypes - source_fraction input column 6 ; the +0.0 indicates that none of the specified mass flow rate will be used for the vvalue(1) entry associated with vbc(1,1) and the 7th column entry -1.0 indicates that 100% of the specified mass flow rate will be used for the vvalue(2) entry associated with vbc(1,2) where a negative value for vbc(8,2) is required to provide the inflow in the negative coordinate direction. This simulation is very similar to Examples 1 and 2 except the source inflow is in the negative coordinate direction.
$xput
...
mat = 'n2', 'h2', 'h2o', 'h2ol',
gasdef(1:14,1)= 1, 'im1', 1, 'jm1', 1, 'km1', 1, 1.015e+06, 300.00, 2, 0., 0., 'n2', 1.0,
gasdef(1:14,2)= 6, 9, 6, 9, 7, 8, 1, -02020801, -2, 1, 0.0, 800.0, 'n2', 0.0, 'h2o', -603, 'h2ol', -604, 'h2', -605,
sortami = 2,
walls(1:8,1)= 6, 9, 6, 6, 7, 8, 1, 0,
walls(1:8,2)= 6, 9, 7, 7, 7, 8, 1, 0,
walls(1:8,3)= 6, 9, 8, 8, 7, 8, 1, 0,
walls(1:8,4)= 6, 9, 9, 9, 7, 8, 1, 0,
walls(1:8,5)= 6, 6, 6, 9, 7, 8, 1, 0,
walls(1:8,6)= 7, 7, 6, 9, 7, 8, 1, 0,
walls(1:8,7)= 8, 8, 6, 9, 7, 8, 1, 0,
walls(1:8,8)= 9, 9, 6, 9, 7, 8, 1, 0,
walls(1:8,9)= 6, 9, 6, 9, 7, 7, 1, 0,
subsodef(1:7,1) = 6, 9, 6, 9, 7, 8, 1,
zeroddef(1:7,1)= 6, 9, 6, 9, 8, 8, 1,
zeroddef(1:7,2)=6, 9, 6, 9, 7, 7, 1,
vbc(1:10,1)= 6, 9, 6, 9, 8, 8, 1, 1, 0.0, 800.0,
vbc(1:10,2)=6, 9, 6, 9, 7, 7, 1, -2, 0.0, 800.0,
vvalue = 0.0, 0.0,
...
$end
EXAMPLE 4
This is an example showing 50% negative direction and 50% positive direction internal source inflow through two surfaces, we use zeroddef(1,1), vbc(1,1) and vvalue(1) and the 6th column entry in the SORTAM file to provide the positive top inflow condition and zeroddef(1,2), vbc(1,2) and vvalue(2) and the 7th column entry in the SORTAM file to provide the negative bottom inflow condition. Note again that the last entry in the IVVALUES - IVTYPES - SOURCE_FRACTION input column 6 ; the +0.5 indicates that 50% of the specified mass flow rate will be used for the vvalue(1) entry associated with vbc(1,1) and the 7th column entry -0.5 indicates that 50% of the specified mass flow rate will be used for the vvalue(2) entry associated with vbc(1,2) where a negative value for vbc(8,2) is required to provide the inflow in the negative coordinate direction.
The input are the same of the Example 4. The only difference is in the definition of source_fraction input.
EXAMPLE 5
This is an example showing inflow on all 6 faces of the defined internal source. Note that for the current model, we need to specify 6 mass flow rate columns - one for each of the source volume surfaces. This example is a direct extension of the previous examples.
$xput
...
mat = 'n2', 'h2', 'h2o', 'h2ol',
gasdef(1:14,1)= 1, 'im1', 1, 'jm1', 1, 'km1', 1, 1.015e+06, 300.00, 2, 0., 0., 'n2', 1.0,
gasdef(1:14,2)= 6, 9, 6, 9, 7, 8, 1, -02020801, -2, 1, 0.0, 800.0, 'n2', 0.0, 'h2o', -603, 'h2ol', -604, 'h2', -605,
sortami = 2,
walls(1:8,1)= 6, 9, 6, 6, 7, 8, 1, 0,
walls(1:8,2)= 6, 9, 7, 7, 7, 8, 1, 0,
walls(1:8,3)= 6, 9, 8, 8, 7, 8, 1, 0,
walls(1:8,4)= 6, 9, 9, 9, 7, 8, 1, 0,
walls(1:8,5)= 6, 6, 6, 9, 7, 8, 1, 0,
walls(1:8,6)= 7, 7, 6, 9, 7, 8, 1, 0,
walls(1:8,7)= 8, 8, 6, 9, 7, 8, 1, 0,
walls(1:8,8)= 9, 9, 6, 9, 7, 8, 1, 0,
walls(1:8,9)= 6, 9, 6, 9, 7, 7, 1, 0,
subsodef(1:7,1) = 6, 9, 6, 9, 7, 8, 1,
zeroddef(1:7,1)= 6, 9, 6, 9, 8, 8, 1,
zeroddef(1:7,2)= 6, 9, 6, 9, 7, 7, 1,
zeroddef(1:7,3)= 6, 9, 6, 6, 7, 8, 1,
zeroddef(1:7,4)= 6, 9, 9, 9, 7, 8, 1,
zeroddef(1:7,5)= 6, 6, 6, 9, 7, 8, 1,
zeroddef(1:7,6)= 9, 9, 6, 9, 7, 8, 1,
vbc(1:10,1)= 6, 9, 6, 9, 8, 8, 1, 1, 0.0, 800.0,
vbc(1:10,2)=6, 9, 6, 9, 7, 7, 1, -2, 0.0, 800.0,
vbc(1:10,3)= 6, 9, 6, 6, 7, 8, 1, 3, 0.0, 800.0,
vbc(1:10,4)= 6, 9, 9, 9, 7, 8, 1, -4, 0.0, 800.0,
vbc(1:10,5)= 6, 6, 6, 9, 7, 8, 1, 5, 0.0, 800.0,
vbc(1:10,6)= 9, 9, 6, 9, 7, 8, 1, -6, 0.0, 800.0,
vvalue = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
...
$end