Professional Documents
Culture Documents
Revision 3
January 2019
January 2019
Abstract
C3D is a computational fluid dynamics and heat transfer computer code has been developed as a
tool for engineering analysis. C3D is designed to solve a wide range of fluid dynamics and heat
transfer problems with a greater emphasis on fires and combustion. This document is a C3D
Theory and User Input manual. It includes a discussion of the theory, models, and a description
of C3D input and output files.
ii
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Table of Contents
ABSTRACT..............................................................................................................................II
1. INTRODUCTION ...............................................................................................................7
iii
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
iv
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
v
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
List of Figures
Figure 1. A comparison of a cylinder using the C3D Body Fitted Method and the
conventional stair step representation often used in finite difference methods.
Both objects have the same grid structure. .............................................................9
Figure 2. A comparison of the exponential kernel approximation solution and the diffusion
approximation with the correction factor applied. The markers are the kernel
approximation and the blue curves are the C3D diffusion approximation.
Optical depths of 0.1, 1, 4 and 50 are shown. ....................................................... 25
Figure 3. The heat flux weighted average surface temperature of a liquid hydrocarbon
open pool fire. ......................................................................................................... 27
Figure 4. A composite image created by the Geomview code showing the objects and the
mesh structure simultaneously. ............................................................................. 73
Figure 5. An example of a clipped elliptical sphere with two radii of curvature created
with the 'esph' command. ...................................................................................... 79
Figure 6. An example of an elliptical cylinder made with the ecyl command. .................... 80
Figure 7. A diagonal plane that has been cropped by a box. The object is easily created by
the 'plane' object command. .................................................................................. 81
Figure 8. A cone shaped object created by the 'cone' command. ........................................ 82
Figure 9. A soot isosurface of an LNG pool fire colored by temperature produced by
Paraview. ................................................................................................................ 99
Figure 10. An oblique view of the example problem. Shown are the enclosure, calorimeter,
fuel pool, and pool fire. The fire is depicted as a 0.4PPM soot volume fraction
isosurface colored by local temperature. ............................................................. 126
vi
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
For fires C3D models liquid fuel evaporation, transport of fuel vapor, oxygen, products of
combustion, chemical reactions and heat release, soot and intermediate species
formation/destruction, diffuse radiation within the fire, and view factor radiation from the fire
edge to nearby objects and the surroundings. Reaction rate and soot radiation parameters in C3D
are chosen based on numerous flare and fire experimental data.
The C3D geometry model utilizes a body fitted method to model flow within and around solid
objects. The C3D body fitted technique is used in conjunction with a structured orthogonal
Cartesian grid. This method allows both coarse and fine discretization with an accurate
representation of object curvature. A structured orthogonal grid allows for fast solutions with
minimal memory requirements. The user can create and run problems with wide range of
discretization (tens of thousands to millions of cells) on desktop workstations.
In order to provide the user with greater accuracy in regions of interest, C3D includes a geometric
sub-grid implementation. The sub-grid implementation allows an accurate tracking of heat and
mass transfer on the surface of any 3-D object. This is done without incurring a significant CPU
overhead or affecting the three-dimensional solution algorithm time step.
The sub-grids can also be used as injection nozzles or vents. Thus the user can exchange mass,
momentum, energy, and chemical species between the sub-grids and the 3-D grid either in an
implicitly calculated or an explicitly assigned procedure. An example of an implicitly calculated
exchange would be a vent that allows mass exchange based upon the local pressure. An example
of an explicit exchange would be a time-dependent injection nozzle where the mass flow rate is
read from a table of values versus time.
There are numerous sub models that allow users great flexibility in modeling real world problems.
For example, there are an indefinite number of chemical reaction models, which can be adjusted
and combined to model a wide range of phenomena, such as wood combustion, organic
decomposition (pyrolysis), and soot formation reactions. Momentum, species, and energy
exchange are allowed to occur between the 3-D and the sub-grids. The user can combine the
reaction rate coefficients to create complex chemical reactions. The chemical reaction equations
are limited to irreversible reactions. However, equilibrium reactions can be modeled by
7
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Another feature that allows great flexibility are time-dependent boundary conditions. Users can
create a file with time dependent information, for example open pool fires can be simulated with
actual wind boundary condition data files.
Time-dependent orifices are another feature that allows the modeling of real world problems.
These orifices can be used to open and shut doors, windows, and valves or be used to simulate
the breakdown of walls or other structures during fires.
Although C3D is capable of solving a wide range of CFD problems there are some limitations.
Very complex geometry's may be difficult to build with the C3D solid modeler, and may best be
approximated with either simpler geometry or import a model developed by CAD software.
Some of the numerical and physical models included in C3D are as follows. The governing
equations are; three momentum equations for predicting the 3-dimensional velocity/momentum
field, an energy equation for predicting the temperature field, and an indefinite number of scalar
transport equations for tracking the flow of fuel vapor, oxygen, and soot, other species of interest,
and turbulent kinetic energy if a one-equation turbulence formulation is chosen. C3D uses a finite
volume approach with orthogonal Cartesian coordinates for discretizing the governing equations.
The use of orthogonal coordinates makes the discretization very similar to a finite difference
method. In a finite volume formulation all vector quantities, such as heat-flux and momentum, are
defined at the cell interfaces whereas scalar variables, such as temperature and pressure, are
defined at cell centers. C3D uses a compressible version of the PISO (Issa, 1985) pressure-based
solution algorithm to solve the flow equations (Suo-Anttila, 1993). Turbulence is modeled by a
large eddy simulation (LES) formulation. In addition the user can also use a optional one-equation
LES formulation or an algebraic formulation. Diffusive thermal radiation transport within a
participating media flame zone is modeled with the Rosseland approximation combined with
correction factors to account for optical thickness. The rate of combustion is modeled by a
combination of Arrhenius and eddy dissipation equations for the reaction rate of fuel and oxygen.
To model curved objects, such as cylinders or spheres, C3D uses a body fitted method similar in
form and function to the Fractional Area and Volume Object Representation method (FAVORTM)
8
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
(Hirt, et. al. 1985). The C3D body fitted method is formulated to work in an orthogonal Cartesian
mesh. This body fitted method models a curved surface by admitting a flat diagonal surface
within a hexahedral finite-volume computational cell. Multiple cells with polygonal cross sections
are used to represent a curved object such as a cylinder. The body fitted method results in a much
better representation of curved surfaces than a stair-step representation, which is often used with
Cartesian coordinate systems. See Figure 1 for a comparison of the C3D Body Fitted Method
with a conventional stair-step representation of a right circular cylinder. A segmented object
representation, such as produced by this body fitted method, has an equivalent heat transfer and
flow representation as a finite-element CFD method would, but it does not incur the overhead of
increased processor and memory requirements associated with either finite-element methods, or
unstructured body fitted methods because the mesh remains orthogonal. With this body fitted
method, the flow areas on all computational cell surfaces are adjusted to account for the diagonal
solid surface. That is, each face of a computational cell has both a solid and fluid area fraction,
and the effect of these area fractions is included in the conservation equations solvers. Heat
transfer between the gas and solid in the same computational cell is calculated by solving two
energy equations. The energy equations use the surface area of the imbedded diagonal surface in
calculating the energy transfer rate.
Figure 1. A comparison of a cylinder using the C3D Body Fitted Method and the
conventional stair step representation often used in finite difference
methods. Both objects have the same grid structure.
The governing equations in C3D are: three momentum equations, continuity equation, species
equations, and one or two energy equations. A set of constitutive equations are included to
couple the governing equations together, and to provide a set of source terms for mass,
momentum energy and species. The constitutive equations are; a pressure equation, a fluid
9
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
equation of state (EOS), and a set of chemical reaction equations, and source terms. C3D also
includes an optional set of one-dimensional sub-grids, which use the same set of governing and
constitutive equations. The 3-D and 1-D sub-grids are coupled together by mass, energy, and
species source terms evaluated at the beginning of each time step.
The primitive variables in C3D are the 3 momentum fluxes (product of density and velocity),
temperature (energy equation), and mass fraction (species equations). The equations of motion that
are solved simultaneously in C3D are the momentum equations, the continuity equation, the pressure
correction equation, and the momentum correction equation.
The C3D momentum equation (Equation 1) is solved in its conservative form for the momentum
flux vector (u),where is the gas density, u is the gas velocity vector, P is the fluid pressure, F
is a drag coefficient, and is the gas viscosity, is the eddy diffusivity, and g is gravity. The
variable area weighting effect due to the body fitting of structure and/or a r-z coordinate system is
included in the operator in all the equations which follow. Expanded forms of these vector (and
scalar) equations can be found in various textbooks [Bird et. al.]
ρu
+ [ u ρu] = - P - ρuF + ( ) u ρg (1)
t
The effect of turbulent shear is approximated in the momentum equation, by adding the molecular
and eddy diffusivity in the viscous drag term. The full tensor form of turbulent eddy shear stress
is not used because only the dominant terms are included in the form shown above. The same
turbulence simplification is made for the energy and species equations. Additional discussion of
turbulence appears in section 2.4 of this document.
ρ
ρu = (2)
t
The first step in solving the set of equations described above is to get an estimate of the
momentum distribution (u*), which is obtained by solving the momentum equations using the
beginning of time step pressure distribution as a source term
*
ρu
u n ρu* Ρ n ρu n F (μ )u* ρg (3)
t
The superscript * refers to an estimate of the momentum flux, and n refers to the beginning of the
time step value.
10
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
The next step is to solve the continuity equation to obtain the mass divergence, which is used as a
source term in the pressure corrector equation:
ρ*
- ρu* (4)
t
The pressure correction equation is derived from the momentum and continuity equations. Since
only a correction to the momentum field is needed, the discretized form of the predictor
momentum equation is subtracted from the end-of-time-step momentum equation resulting in a
‘momentum correction equation’. The pressure correction equation is derived by a dot product of
the operator and the momentum correction equations, and substituting the corrector continuity
equation. The result of these operations is:
ρ * ρ n 1
2 P n 1 2
2 P n (5)
Δt
Here n+1 refers to the end-of-time step value, n is the beginning of time step value, * is the end of
time step predictor value, and t is the time step size. The end of time step density appears in this
equation and that is related to pressure through the equation of state. The solution of the pressure
correction equation is used with the momentum correction equation (e.g., Equation 6) to obtain
the final end-of-time-step momentum field:
(ρu n 1
ρu*)
P n 1 P n (6)
Δt
Once the end of time-step, the momentum field has been obtained, all of the transport equations
for energy, species, and turbulence can be updated for their end of time step values.
1. Evaluate all properties, turbulence parameters, and other constitutive parameters based
upon beginning of time step values.
2. Solve the momentum equations to obtain the predictor momentum distribution.
3. Integrate the continuity equation to obtain the predictor density distribution.
4. Solve the pressure equation for a new pressure field that satisfies the continuity
equation and equation of state.
5. Solve the momentum corrector equations for the corrected momentum field.
6. Solve the transport equations for the end of time step scalar variables
11
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
7. Solve the energy equation for the end of time step temperature.
8. Solve the structure energy equation for the end of time-step structure (solid)
temperature.
This sequence of calculations is then repeated for the next time step. Note that this solution
algorithm does not require iteration for solution stability. Stability, and solution accuracy, is
achieved by time step control rather than iteration. In particular, the time step is regulated to keep
the mass divergence error, and other key variables (e.g., equation of state error, courant number,
fluid temperature change, density change, eddy viscosity, or structure temperature change) below
specified values.
A set of transport equations is solved for the various chemical species that are present. The
transport equations for chemical species are solved in their conservative form where is the fluid
density, mi is the mass fraction, u is the velocity vector, Di,j is the diffusion coefficient of species i
thorough the bulk fluid j, and Si is a species source term. The diffusion coefficient is the sum of
the molecular diffusion coefficient and the eddy diffusivity due to turbulence.
ρm i
ρ(u v p )m i (ρD i, j ρ )m i Si
t
(7)
Where Vp is the drift flux velocity of the particles, or zero if the species is miscible fluid.
ρc p T As
+ ρc p u T = ( k ρc p ) T + Σ h s ( Ts - T ) + Q v
t V (8)
1 DP 1
- [ (ρu 2) + ρ uu 2 ]
Dt 2 t
12
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
where cp is the specific heat at constant pressure, T is the gas temperature, Ts is the temperature of
structure s, a is an area weighting term that accounts for porous structure, k is the fluid conductivity
(including diffusive radiation conductivity), is the eddy diffusivity, hs is a heat transfer coefficient to
structure surface s, As is the heat transfer surface area of structure s, V is the flow volume, and Qv is
the volumetric heat source, is the ratio of specific heats. Heat sources due to radiation transport
boundary conditions, chemical reactions, energy exchange with sub grids, and other explicit heat
sources are lumped into the Qv term.
Radiation heat transfer is included in the energy equation as source, or sink terms. Radiation heat
transfer is discussed further in section 2.6
Ts 1 Ag
ρs cs = k s aTs + Σ h g ( T - Ts ) + Q s (9)
t a V
where, s cs is the structure density times specific heat, ks is the conductivity, hg is a heat transfer
coefficient to gas in cell k, Ag is the surface area for heat transfer to gas in cell g, V is the volume of the
structure, and Qs is the volumetric heat generation in the structure. The summation refers to heat
transfer with the gas in all of the adjacent cells (left, right, top, and bottom) and to the gas within the
same cell.
In C3d there are two turbulence models to choose form, a zero equation Large Eddy Simulation
(LES) model based upon the concepts of Smagorinsky (1963), and a dynamic LES model with
one equation turbulent-subgrid kinetic energy model. In a LES turbulence model, the largest
turbulence scales are resolved by the CFD calculation as flow eddies. The smaller scale
turbulence is modeled by other methods and is called subgrid scale turbulence. The turbulent
subgrids in this discussion should not be confused with the geometric subgrids in C3D that are
used for grid refinement, see section 2.7 of this manual.
In a conventional zero-equation LES model, the eddy viscosity is calculated by the following
formula:
LES max , Cs 2 S (10)
Where Cs is a constant of proportionality (typically 0.15 - 0.2), is the fluid viscosity, is the
length scale of the turbulence (which in a zero equation model the cube root of the cell volume),
and |S| is the magnitude of the deformation tensor:
2 2 2 2 2 2
2 u v w u v u w v w
S 2 2 2 (11)
x y z y x z x z y
13
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
However in order to use a LES model appropriately one must select a grid structure such that
significant fraction of the turbulent kinetic energy resides in the resolved turbulent scales. One
drawback of conventional LES is that the Smagorinsky zero equation approach is valid only in
homogeneous turbulence, not anisotropic turbulence found in fires or many other applications.
To include anisotropy Cs would no longer be a constant, instead it would vary as a function of
time, position and direction.
The second approach in C3D overcomes some of the drawbacks of conventional LES by adding a
transport equation for the subgrid scale turbulent kinetic energy. The transport equation is solved
in its conservative form for the kinetic energy of subgrid scale turbulence, as shown in the
equation below:
ρk ε ε C ρ k 1.5
ρuk μ k u d 0 (12)
t ρ ρ l
Where is the fluid density, k is the subgrid scale turbulent kinetic energy, is the eddy
diffusivity, Cd=0.08, and l is the turbulent length scale which is the cube root of the cell volume.
The relationship between turbulent kinetic energy and eddy diffusivity is,
Where Ck is a user input constant, typically of order 0.15. The last term in the equation is the
turbulence dissipation rate. Note that in this one equation formulation, eddy dissipation is not a
separately transported scalar as in conventional two-equation k- model, but is transported along
with the turbulent kinetic energy and is a simple power law function of that energy. Some
researchers have used two equation subgrid scale LES models, however they are not practical
from an engineering analysis viewpoint since more constants are introduced that require validation
by comparison to measured data, and that data is simply not available for all conditions.
All numerical turbulence models typically add numerical dissipation to the solution. This
numerical dissipation coexists with the modeled turbulent dissipation and often results in too
much dissipation. When using C3D, coarse meshes are often employed, which by their nature
includes numerical dissipation. C3D reduces the numerical dissipation in the turbulence model by
estimating the numerical dissipation based upon the users grid size and local flow velocity vector.
The predicted numerical dissipation is subtracted from the model-predicted turbulent dissipation
to obtain a better estimate of the net turbulence intensity in the direction of flow. If the remainder
from the subtraction is positive, that remainder is included in the solution to the momentum and
other transport equations. If the remainder is zero, or negative, it is not included in the solution.
This approach yields a better approximation to the turbulent dissipation level predicted by the
turbulence model since it compensates for numerical dissipation to the extent possible.
14
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
This section describes the chemical reactions that C3D uses to model the chemical processes
within a hydrocarbon pool fire or flare. This model has evolved over time and has been calibrated
against fire data of various fuel types and pool and flare sizes. The chapter that follows was taken
from C3d Combustion Model Validation Report.
The C3D combustion rate equations are based upon a combination of Arrhenius and Eddy
Breakup reaction time scales. The characteristic time from the Arrhenius kinetics equation is
combined with the characteristic turbulence time scale in the following equation:
1 Ceb x 2
ttotal = tarrhenius + tturb = + (14)
TA εdiff
AkT exp T
b
The simplified combustion chemistry in this model is separated into the following types, a primary
fuel breakdown reactions into intermediate combustion products followed by tertiary reactions to
final products of combustion. All of the reaction equations can be included in the combustion
model even if the species involved do not exist so that it is suitable for a wide range of
applications. The intent of this set of chemical reaction equations is that they remain fixed and do
not vary from one application to the next. This constancy has been found to be valid for a wide
range of fuels without modification.
The relevant species in this model are the hydrocarbon fuel vapor which can be either a single
species, several mixed species or an equivalent mixture. For example jet and diesel fuels are a
mixture of hydrocarbons but can be modeled as single fuel specie with similar chemical and
physical properties such as dodecane C12H26. Fuel plus atmospheric oxygen (O2), solid carbon
soot (C), single or multiple intermediate species, and products of complete combustion (which
consists of CO2 and H2O vapor) comprise this simplified combustion model. The identity of the
intermediate species is assumed to be C2H2, H2, CH4, Soot, and CO. This simplified combustion
15
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
model is validated for applications where heat transfer and flame size and shape are the primary
objectives. The radiative properties of both the fuel and intermediate species are relatively
insignificant compared to soot for smoky fires, but significant for light hydrocarbon fires such as
methane which have low soot production.
The first combustion reaction is incomplete fuel combustion or breakdown that produces
intermediate products CH4, C2H2, CO, H2, and some H2O. The subsequent reactions will burn the
intermediate products and form soot. Reforming reactions that would occur with OH radicals are
included but the oxidizing species is simplified as water vapor. An equilibrium reaction between
acetylene, methane and hydrogen is also included so that some fuels such as methane can produce
soot via equilibrium reactions. All of the subsequent intermediate and final reactions are constant
from one primary fuel type to another, and that is an important feature of this combustion model,
only the first fuel breakdown reaction needs to be modified to accommodate a wide variety of fuel
types.
Primary Fuel Breakdown reactions shown below have been used successfully on a wide range of
combustion simulations. They can be used individually or combined into a single fuel breakdown
reaction by mole weighting and adding the mole fraction weighted reactions together to form a
mixed fuel type.
Other hydrocarbons not in the list can be added by breaking down the hydrocarbon into CO, C2H2, H2
and H2O. The various coefficients of breakdown products can be estimated by the following simple
rules. Heavy sooting hydrocarbons produce more C2H2 and possibly a small amount of soot. The heat
release for primary fuel breakdown can be adjusted by producing more H2O for higher heat release vs.
more H2 for less heat release. The balance of oxygen consumption, and CO production are determined
by the elemental balance. It turns out that this combustion model has mild sensitivity to the primary
breakdown reactions, which gives the user a lot of flexibility in modeling combustion of various fuels.
It is the secondary reactions that mostly determine the flame temperature, soot production and so on.
16
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
C2H2 + 0.9 O2 → 1.8 CO + H2 + 0.01 C20 (soot) Acetylene combustion + soot nucleation
In conditions of low oxygen and high temperature, hydrocarbon and soot reforming reactions
occur. The reforming reactions are especially important in some industrial applications were there
is low oxygen within the flame zone. The primary fuel breakdown reactions produce H+ and OH-
radicals which here are modeled as water vapor (H2O - similar to the approach used by
Westbrook and Dryer). The reason that water vapor is used as the oxidizing agent is because
measurements indicate that actual mole fractions of OH and H radicals are on the order of 1% or
less, so they are present as trace quantities even though they are the primary reactive species. The
water vapor can react both with primary fuel to produce C2H2, CO, and H2. It can also oxidize
soot to produce CO and H2. Thus a typical reforming reactions for ethylene would be
Only the hydrocarbon reforming reaction for ethylene is shown here. Similar reactions can be
derived for the other fuels by copying the primary fuel breakdown reaction and substituting H2O
for O2 and re-balancing the reaction equation.
The energy associated with these reactions is calculated from the heats of formation of the
products minus reactants. In the C3D the energy yield is calculated automatically because the heat
of formation of each species is included in the input file.
17
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
A global Arrhenius rate model is used for all reactions. As such, the consumption of fuel, soot,
and intermediate species are described by:
[ ]
N
df R1
dt
=− C Πf i
pR
i
TBe
− T A /T
(15)
In this expression, N is the number of reactants. The moles of each reactant is f R for i = 1 to N, C i
is the pre-exponential coefficient for the reaction, and TA is the effective activation temperature
for the reaction and B is a temperature exponent. The activation temperature TA is simply the
activation energy divided by the universal gas constant. The exponent p on the molar
concentration allows the use of a global reaction rate. A global reaction rate is often used to fit a
simpler reaction to multiple reactions and pathways that result in the same reaction products.
Although reaction equation 2 is written in terms of molar concentration, internally within the
code, it must be solved in terms of mass concentration. The reason is that the number of moles of
reactants and products is not a constant during the reaction time step whereas the total mass of
reactants and products remains fixed, and this property allows one to make a numerical
approximation for the solution. We see that the local rate of consumption of the primary reactant
df R /dt
1
increases with the local absolute temperature T and the product of all the local reactant
mole concentrations. The primary reactants f1 and f2, the effective activation temperature TA, the
pre-exponential coefficient C, global exponent p, and the temperature exponent B for each
reaction are given in Table 1. The values in the table were derived from published values in some
cases and by comparisons with experiment in others.
TA C B
Reaction f1 f2
(K) (1/s)
18
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
All of the above reactions obey the normal Arrhenius or global reaction kinetics equations. The
oxidation of CO includes a square root of water mole fraction weighting factor from Westbrook
and Dryer.
It turns out that the kinetics coefficients for soot oxidation are such that at high enough
temperatures where soot oxidation occurs, the reaction rate quickly becomes boundary layer
diffusion limited. This is because soot is a particle with a boundary layer, not a gas mixture. The
temperature dependence for soot oxidation is due to the variation in mass diffusion coefficient
with temperature. Soot oxidation due to water reforming reactions is of higher chemical reactivity
than that due to oxygen but it too is limited by boundary layer diffusion. Thus the soot oxidation
due to oxygen is the same as water reforming reactions but is actually slower due to an additional
eddy breakup time delay because oxygen must diffuse into the flame zone from outside.
There is no formal soot number density model which includes particle nucleation, growth, and
agglomeration. The reason is that from a heat transfer/thermal radiation perspective only the
volume fraction of soot matters and that can be derived directly from the mass fraction of soot in
the gas mixture. All other aspects of a soot formation and growth do not play a role in calculating
radiation heat transport because the soot particles and agglomerates are smaller than the
wavelength of light and therefor obey the Rayleigh limit. In the small particle Rayleigh limit
thermal radiation only depends upon temperature and volume fraction of the particles.
In this combustion model soot ( C20) is modeled as 20 carbon atoms. Although the actual soot
particles are fractions of a micron in size, they still consist of billions of carbon atoms. However
from a computational standpoint it does not matter what molecular weight is chosen for the soot
particles as long as it is at least 10 times larger than the typical molecules in the gas. With a large
molecular weight (240 for C20) the computational gas volume occupied by the carbon soot is very
small, typically 0.001 mole fraction, so it does not affect the fluid dynamics. The independence of
soot molecular weight from fluid dynamics and radiation heat transfer was verified by a test
calculation comparing results to a higher molecular weight soot wt=2400 simulation that
produced identical results. The soot volume fraction used in calculating radiation properties is the
soot mass fraction times gas density divided by soot particle density (1740 kg/m3). At medium to
large geometric scale soot volume fractions on the order 1 PPM are typical in sooty combustion
systems burning heavy hydrocarbons such as jet fuel, and 0.5 PPM or less when burning lighter
fuels such as ethylene.
Some of the reactants play a minor role in JP8 combustion such as hydrogen and methane
however they would play a dominant role with fuel such as liquefied natural gas (LNG). For this
reason, to keep the combustion model as general as possible, the hydrogen and methane reactions
are included for all fuel types.
19
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Note that the last two reactions are forward and reverse acetylene-hydrogen-methane reactions
and represent an equilibrium state of those reactants. The coefficients were derived by solving for
reaction rates that are equal at 1700K, the Gibbs free energy equilibrium temperature. These
equilibrium reactions allow the formation of small amounts of soot in LNG fires and methane
flares.
Thermal radiation transport is a mathematically intensive subject with many possible approximate
methods of solution. In C3D, the objective is to obtain a solution of suitable accuracy with a
minimum amount of CPU overhead. To this end, in C3D, thermal radiation transport within and
near large hydrocarbon fires is split into two types: diffusive radiation inside the flame zone and
clear air or view factor radiation outside the flame zone.
Thermal radiation transport within the flame zone can be categorized by the quantity of smoke
produced by the fire. Clean burning fires, such as those fueled by alcohol or methane, typically
have long radiation absorption path lengths. Smoky fires, such as oil or jet fuel fires, have large
amounts of soot, and consequently short radiation absorption path lengths. Recent measurements
in a controlled JP8 fire indicated that the absorption length, 1/R, where R is the extinction
coefficient, is on the order of 5-10 centimeter in a 2-meter fire (Murphy, 2003). Gases with long
radiation absorption path lengths (compared to the relevant geometric scale length, i.e. fire
diameter) are considered optically thin, whereas gases with short radiation absorption path length
are considered optically thick – both types can be solved by different numerical methods.
Optically thin media require numerical solution techniques that typically ignore radiation
absorption within the fire and are not CPU expensive. Optically thick media can use diffusion
equation solution methods that are also not CPU expensive. Media that are neither optically thin
or thick often require radiation transport solution methods that are very CPU intensive to which
there are many approximate methods of solution. Within C3D only diffusive radiation transport
algorithms are utilized because they are quick to solve. However to extend the range of
applicability into the optically thin radiation zones a correction factor is applied. The correction
factor was derived by scaling a diffusion equation solution and fitting it to a more exact radiation
transport solution. Thus, C3D radiation models are applicable to a full range of optical thickness
in an approximate sense. This correction factor approach to solving the radiation transport
equation has been validated by comparisons to many radiation experiments where the optical
thickness varied from very thin to quite thick.
Outside the flame zone thermal radiation transport can be modeled by clear air or view factor (ray
tracing) methods. A complicating factor is that the surface of a fire, or smoky region, is
dynamically changing due to the puffing and wind effects. C3D includes view factor radiation
model wherein the surface radiation characteristics of a smoky fire are recalculated each time step
to allow clear air radiation transport. The model is can be simplified by ignoring shadowing effects
of any intervening objects, and radiation absorption by clear air as a used input option. Alternately
shadowing and absorption by intervening objects and participating media is included in C3D but
20
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
the ray tracing can be very CPU intensive for some problems. Obviously, if a wall, or other object,
separates an object from the fire, shadowing effects are very important. In such cases the user
must turn on ray tracing, (it is turned off by default). To further simplify and speed up the
viewfactor computation, the surface normal vector of the flame surface is approximated to align
with either the computational cell boundary faces, or the vector sum of the surface normals if
multiple faces of a cell are emitting radiation. Such approximations allow C3D to compute clear
air view factor radiation with less CPU overhead.
16 n 2T 3
kR (20)
3 R
In this expression, T is the local temperature, is the Stephan-Boltzmann constant, n is the media
index of refraction, and R is the local extinction coefficient of the medium. The extinction
coefficient is a function of the local mass and mole fractions of soot, water vapor, carbon dioxide,
fuel vapor and other species (Modest 1993).
The method for combining the effects of all the participating species is first to calculate the local
emissivity of each molecular species independent of all other species. Next, a combined emissivity
is derived from the sum of all extinction coefficients
1 / 1 / 1 1 / 2 ......
Where is the net combined molecular gas emissivity of the mixture, where 1 2 …, are the
emissivities of the individual molecular gases. The formula above is used for combining the net
effects of all the molecular gases, but not soot. Soot is included as follows. First calculate the net
extinction coefficient of the molecular gases according to the formula:
21
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
ln(1 )
g
Lb
Where Lb is the mean beam length, and g is the extinction coefficient of the combined molecular
gases. The mean beam length Lb is found by summing all the local emitting surface areas (As), and
participating media cell volumes (Vb) and then applying the formula
3.6V p
Lb
As
The method of finding the sum of emitting surface areas and volumes is described in the clear air
viewfactor section of this report.
Next, the soot extinction coefficient is found by integrating the temperature dependent black body
radiosity over the wavelength dependent soot absorptivity. After integration, a simplified
approximation for the extinction coefficient of soot is:
3.6 f v C o T
s (21)
C2
Where s Rosseland extinction coefficient (m-1) (1/L in conductivity formula)
fv is the soot volume fraction
C2 is 1.4388 cm K, (Planck’s second constant)
Co is a constant that depends on the soot complex index of refraction shown in the
formula below
36 nk
Co 2
(22)
( n k 2 ) 4 n2 k 2
2 2
The soot volume fraction is calculated from the local soot mass fraction and the solid density of
soot s (approximately 1740 kg/m3 Choi et. al. 1995):
m
fv s (23)
s
Where
fv is the soot volume fraction
ms is the mass fraction of soot
is the local gas density
s is the density (kg/m3) of solid carbon in soot
The mass fraction of soot is calculated by the transport equation for soot.
22
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
In addition to the formulas above, a user input scale factor is included which will multiply the
calculated extinction coefficient. Thus the user has the ability of scale any of the built in curves for
soot, H2O, CO2, CH4, CO, C2H2, by a multiplicative factor to account for non-ideal effects.
The user input scale factor for molecular gases multiplies the beam length, not the gas emissivity.
The formula that is used for combining the net effects of all the molecular gases and soot is to
sum the molecular gas and soot extinction coefficients, as in the formula below.
r ss s g
Where ss is a soot scale factor, s is the extinction coefficient of the soot, g is the extinction
coefficient of the combined molecular gases.
(Tg 4 Tw 4 ) A
Qv (24)
(1 / ( ) g 1 / w 1)V
Where is the Stephan Boltzman constant, Tg is the gas temperature at the surface, Tw is the solid
surface temperature, (or environment temperature if the bounding surface is the flame edge), g
is a corrected local media emissivity which is a function of optical depth , w is the bounding
surface emissivity, A is the surface area of the material within or adjacent to the cell, and V is the
volume of the cell.
This boundary heat source approach is identical to the Deissler slip boundary condition but is
much easier to implement numerically than the derivative approach.
The error introduced by the radiation diffusion approximation is corrected for optical depth by the
g factor. Understanding the use and applicability of this correction factor will allow the user to
understand the limits imposed by this diffusion approximation for radiation transport. It is
demonstrated below that reasonably accurate solutions for radiation transport in fires can be
obtained by using this formulation for a wide range of optical depth.
Within the flame zone the radiation transport is modeled by diffusive radiation. It is well known
23
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
that diffusive radiation does not apply to optically thin media. However it will be demonstrated
that in the case of a fire, applying a correction factor will lead to temperature and heat flux
predictions that are surprisingly accurate for the full range of optical thickness. The method of
using a correction factor is similar to the “blackness coefficient” boundary condition often used in
nuclear reactor neutron transport. Blackness theory utilizes a diffusion equation solution and
adjusts the boundary condition such that the resulting solution is a close approximation of the
exact radiative transport equation solution.
In C3D the radiation slip boundary conditions cause the internal temperature of any heat
generating medium, such as a fire, to float to a temperature where the total heat generated is
equal to the heat lost by radiation plus heat advected away by fluid motion. In the development
that follows fluid motion will be neglected even though it is explicitly accounted for in the
solution of the energy equation.
Many approximate methods to solve the radiation transport equation exist, amongst which the
exponential kernel approximation is quite useful. In the exponential kernel approximation, the
exponential integrals are approximated by simple exponential functions. Making such a
substitution, allows an approximate solution to be derived for the radiation transport equation
over a wide range of optical thickness.
In order to derive the boundary correction factor, a one dimensional slab of gas with isothermal
boundaries and internal heat generation was chosen. Using the exponential kernel approximation,
the solution to the radiation transport equation in a slab is:
0 1 3
(T ( ) g 4 Tw 4 ) ( 0 2 )
4 3 8
Where
T()g is the local medium temperature
Tw is the bounding surface temperature
is optical depth, measured from the bounding surface
is optical depth between the surfaces
Without a correction factor, i.e. )=1, the slab temperature would float to a level where all the
heat generated in the medium would leave at the boundaries by radiation. However the resulting
temperature distribution would not be the same as that predicted by the exponential kernel
solution above. By changing the value of ), the temperature slip level can be adjusted such that
resulting temperature distribution is the same as that predicted by the exponential kernel
approximation. Thus, a numerical function has be derived which allows an accurate prediction of
the temperature and heat flux over the full range of optical thickness. This correction factor is
built in to the C3D code. Actually the correction factor is a function of geometry, and the one
derived here is for slab geometry. This limitation is not too restrictive if one confines the solutions
to large fires wherein boundary curvature is not too severe.
24
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
A comparison of the predicted C3D temperature distribution and the exponential kernel
temperature distribution for several optical thicknesses is shown in the figure below. In these
examples the distance between the plates is 2 meters, and the heat source is 2x105 W/m3, which
are values typical of a moderate size fire.
Figure 2. A comparison of the exponential kernel approximation solution and the diffusion
approximation with the correction factor applied. The markers are the kernel
approximation and the blue curves are the C3D diffusion approximation.
Optical depths of 0.1, 1, 4 and 50 are shown.
As shown in figure 3 above, the difference between the C3D predicted temperature profile and the
exponential kernel temperature profile is negligible. This is true even for the case of optically thin
media, = 0.1. The radiative heat flux at the boundaries is exact since these are steady profiles
and all heat generated within the medium is exactly equal to the heat lost at the boundaries. The
agreement between the exponential kernel approximation and the corrected diffusion
approximation implies that this approach can be used to estimate the temperature and radiative
heat flux from a fire for a wide range of optical thickness. This statement has been validated in the
C3D Combustion Model Validation report where the radiation flux predicted by C3D has been
successfully compared to numerous tests where radiation has been measured.
25
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
To find the locus of fire surface cells the entire computational domain is examined for locations
where the media concentration between two adjacent computational cells lies both above and
below this surface value. Any cell boundary that satisfies this criterion is assumed to be part of the
fire surface. The surface normal vector points in the direction of the lower concentration and is
perpendicular to the cell face. In computational cells which have more than one radiating cell face,
a normalized vector sum is performed to assign the surface unit normal vector. The fire surface
unit normal vectors are calculated at each time step in order to track the changing shape of the
fire.
When using this method, the user will input a surface mass fraction of a combustion product. This
requires the user to include products of combustion (typically a mixture of CO2 and H2O) in the
species definitions. A typical value for the surface media concentration is a mass fraction of 0.06
for H2O or 0.08 for CO2. This value has been found to work quite well for a wide variety of fire
sizes, and fuel types.
The view factor between a fire surface cell and an object surface cell is calculated by the formula:
f12
n s n
i ij j s ji
Aj (25)
s 4
This computation is rapidly performed using combinations of the dot product of the normal
vectors and the position vector.
The proper choice of media mass fraction, remains to be defined. Unfortunately this parameter is
neither fixed nor easily implemented as a function because it depends somewhat upon the
26
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
computational cell size, (that is if large cells are used at the perimeter of the fire). Heat flux
measurements of emissive power from open pool fires, as a function of pool diameter, have been
made by many people in the fire community. A plot of average pool fire surface temperature,
derived from the measured emissive power (SFPE, 1995), as a function of pool diameters is
shown in Figure 4.
1300
1000
900
800
700
600
1 10 100
Pool Diameter (m)
For a given fire size (and computational mesh structure), the user can adjust surface media
fraction, until the predicted fire surface temperature and the measured value are the same. One of
the parameters that is output at each time step is the average surface temperature and size as well
as total radiated emissive power, so the user can easily monitor these values as a function of user
input values. The dependence of fire surface temperature upon computational cell size is due to
the fact that, near the fire edge larger cells will contain a greater amount of dilution air per unit
combustion energy, this reduces surface temperatures and decreases surface radiation. Using small
cell sizes will avoid this complication, but may result in an unacceptably slow computation. Thus,
depending upon the problem being solved, the user may be wish to run several calculations
varying the surface soot, or media, concentration until a suitable match between predicted and
measured surface temperatures is found. Typically, the media product-of-combustion mass
fraction of 0.06 for H2O and 0.08 for CO2 has been found to be reasonably constant from one fire
to the next when compared to experiment. The greatest sensitivity appears to be mesh resolution,
larger computational cells requiring slightly lower values.
27
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Radiation that leaves a fire surface is subject to possible shadowing caused by intervening objects
or absorption by media such as other flames along a line of sight. If there are intervening objects
that will cast shadows, this effect is automatically included during the fire viewfactor calculation if
the ray tracing option is turned on. In addition, radiation that leaves a fire surface is may pass
through other fires which can absorb some of the radiation and this effect is also included since
the optical extinction coefficient is known for each computational cell as part of the solution. If
the user is solving a problem with a million or so cells the ray tracing algorithm may be very slow.
In such cases the user may want to freeze the flow and temperature distribution and ray trace the
frozen snapshot of the fire, rather than repeating the calculation at each time step.
Finally, there is an option to include intervening air absorption of radiation due to CO 2 and H2O in
the surrounding air. This option is based upon the atmospheric absorption model of Hamlins. The
absorption depends upon air temperature, humidity and source temperature.
The C3D solid modeler assigns polygon surfaces to solid objects that intersect the computational
cells as previously shown in figure 1. C3D includes a set of CFD solvers that can be coupled to
each, or any subset, of those polygon surfaces. Thus local grid refinement for solid surfaces is
modeled in by an independent finer grid structure and it can exchange mass, momentum, energy,
and species with the three-dimensional mesh. In this way, various heat and mass exchange
processes can be simulated on a much smaller scale compared to the computational grid size
without increasing the CPU cost significantly.
The geometric subgrids are solved thermally in 3 dimensions, with the lateral dimensions solved
explicitly and the perpendicular dimension implicitly. The lateral conduction solution to the
neighboring cells is typically of much greater geometric dimension which allows for a faster
explicit solver. The perpendicular dimension can be resolved to any degree of refinement chosen
by the user. Hence very thin walls can be modeled in detail without incurring a CPU overhead on
the main 3-D grid.
Hereafter in this report the geometric subgrids will be called 1-d subgrids because that is the
normal direction of grid refinement. If the neighbors of a 1-d subgrid have the same perpendicular
cell sizes and number then lateral 3-d heat conduction is included. The primary limitation of this 1-
d subgrid formulation is that only lateral heat conduction occurs, there is no exchange of
momentum or species laterally.
Advective heat, mass, and momentum transport is directed normal to the polygon surface, not
laterally. There is no restriction on the number of different types of sub-grids. For example, some
can model layered steel surfaces with radiation gaps, others composite layered materials, others
chemically reactive materials such as wood or other organics, and others directed nozzles of
combustors. All can be active in the same problem.
As an example, if the user wanted to burn wood, 1-d subgrids would be assigned to the 3-d model
28
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
of the wooden object. 1-d sub-grid conservation equations (mass, momentum, energy and
species) would be activated, and mass/energy/species exchange coupling assigned to the 3-d
mesh. As the wood is heated, say for example by a pre-existing fire or other heat source,
chemical reactions would decompose the wood into char and combustible gases. The combustible
gases would be transported to the boundary of the 1-d mesh and then passed into the 3-d mesh as
source terms where they can react with oxygen to form a wood burning fire. Since the 1-d mesh
includes species equations, depletion of the combustible gases during the pyrolysis reactions
would be tracked and the wood combustion process would slowly diminish and ultimately decay
into glowing char. Of course the user would be required to set up all of the chemical reactions
associated with such phenomena. The point is that such a framework exists within the C3D code.
Another example would be the use of subgrids in modeling combustor nozzles. In such a case the
1-d subgrids are free standing and not assigned to a polygon surface. The user would read a file
containing the 3-D location, orientation, exit area of the combustor nozzle or nozzle holes. C3D
would convert all of the nozzle data into a subgrid and use that data to inject fuel and any other
gases into the 3-D domain at the appropriate rate, velocity, direction, and length of source.
The length of the source term is also input and hereafter called a line source. A line source
consists of a set of source terms for mass, momentum, energy and species that are arranged along
a group of computational cells in a specified direction, location, and length (number of
computational cells). If the source is an open ended pipe then typically five line sources of 5 to 10
pipe diameters long are used and oriented in the direction of the jet flow. The C3D code will place
the line sources in the appropriate computational cells based upon grid resolution. Thus there may
be many line sources within a cell depending upon the grid resolution. If the flare source is a
nozzle of many small distributed holes arranged on spokes of approximately 0.5m diameter, then a
large group of line sources of length 1m has been used successfully. The number of sources in a
spoke pattern nozzle typically matches the number of holes in the nozzle. The line source length
of 1m was found to give a good representation of such a nozzle, although other lengths could be
used as well. The flame size, shape, and emitted radiation does have a weak dependence upon
line source length.
In many C3D calculations, the user may be interested in heat transfer to solid objects. In such
cases, the 1-d sub grid momentum and species equations are turned off, and only the 1-d subgrid
energy equations are activated.
When modeling debris or aerosol deposition and entrainment, the 1-d subgrid species equations
are activated. The 1-d subgrids exchange debris and/or aerosols with the main 3-d domain using
the C3D entrainment and deposition models.
In the example problem, see section 11, 1-d sub grids are used to track the thermal heat up of a
thin 3mm steel calorimeter with 5 cm insulation. The figures depict the surface temperatures after
a two-minute fire. These temperatures were calculated by heat exchange between the 3-d grid,
which includes the fire and its associated thermal radiation, and the 1-d subgrids, which includes
the transient heating in the comparatively thin objects.
29
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
The C3D code has been tested both by comparison to analytical and experimental data.
Theoretical comparisons of conservation of mass, energy, and species have been performed with
good results. Overall (global) conservation of mass is accurate to machine accuracy. Local
conservation of mass is accurate to the user specified EOS error (an input parameter). Local and
global conservation of energy and species depend upon the problem being solved. Steady flow
(combustion) problems have energy and species conservation accurate to within a percent.
Transient combustion problems have energy and species conservation accurate to within a few
percent, or better depending upon the problem. The loss of accuracy for transient problems is due
to the segregated nature of the solver, that is each conservation equation (momentum, energy,
species) is solved in turn, as sequence of steps, rather than simultaneously. Note that these
comparisons are done over long time scales where errors can accumulate. Conservation errors
over a single time step are negligible.
Conservation of momentum (which includes all the terms in the momentum equation
simultaneously) cannot be tested directly by numerical computation because solutions to the
Navier-Stokes equations are not unique due to non-linearity. There are no theoretical solutions
except for trivial cases such as laminar flow. Instead, conservation of momentum has been
validated by comparison to experimental data. Flow through orifices and around blunt bodies was
examined and comparisons of pressure distributions and vortex shedding frequencies were made.
Results were within experimental error.
Global/integral comparisons which include all of the conservation equations, the 1-d subgrid
equations, as well as sub models such as heat transfer, radiation, combustion, etc. have been made
by comparisons with several open pool and enclosure fires. Results of these comparisons are
good, and are discussed in the following papers and reports.
Suo-Anttila, A. C3D Combustion Model Validation. CEA Report 2019-1, Jan 2019.
Lopez,C., A. Suo-Anttila, J. Koski, I. Khalil. Calibration of the CAFE3D Code with Controlled
Indoor Fire Data. Proceedings International Symposium on the Packaging and
Transportation of Radioactive Materials PATRAM 2004
Greiner, M., and Suo-Anttila, A., “Validation of the ISIS Computer Code for Simulating Large
Pool Fires Under a Varity of Wind Conditions,” ASME J. Pressure Vessel Technology,
Vol. 126, pp. 360-368, 2004. Journal Paper, (Also presented at the ASME Pressure
Vessels and Piping Conference, Cleveland, Ohio, July 20 - 24, 2003 Conference
Paper.)
Lopez, C., J. Koski, A. Suo-Anttila. Development and Use of the CAFE3D Code for Analysis
of Radioactive Material Packages in Fire Environments. Institute of Nuclear Materials
30
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Suo-Anttila, A., Wagner, K.C., and Greiner, M., "Analysis of Enclosure Fires Using the ISIS-
3DTM CFD Engineering Analysis Code," Proceedings of ICONE12, 12th
International Conference on Nuclear Engineering, Arlington, Virginia USA, April 25-
29, 2004
Ju, H., Greiner, M., and Suo-Anttila, A., “Computer Simulations of a Generic Truck Cask in a
Regulatory Fire Using the Container Analysis Fire Environment (CAFE3D) Code,” Int.
Journal of Radioactive Materials Transport, Vol. 13, pp. 35-40, 2002. Journal Paper.
(Also presented at the 13th International Symposium on the Packaging and
Transportation of Radioactive Material (PATRAM), CD-ROM, Chicago, Illinois,
September 3-7, 2001.)
Most of these papers show comparisons of heat transfer measurements within and near fires or
flares with code predictions. The first most recent report contains many combustion examples
with comparison to test results. Two other codes are mentioned, CAFE3D and Isis3D. Both of
these codes are earlier versions of the C3D code and contain many of the same numerical models.
The last (ITSC) report contains numerous examples for a wide variety of theoretical and
experimental comparisons.
A free demo version of the C3D code can be obtained by email from the code author. Email
ajsuoan@comcast.net and request a copy of the C3demo version. The demo version is limited to
200,000 computational cells and a single CPU, however a commercial unrestricted version is also
available for a license fee.
The demo version will include some sample input files and the xplot viewer. Paraview or an
equivalent data viewer must be downloaded from LANL or elsewhere by the user. C3demo has
been complied for Linux workstations, although a windows version can be made available by
request.
31
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
There exists a graphical user interface (GUI) to aid users in setting up input files. The GUI writes an
input file that is subsequently run by the C3D code. The input file is an ASCII text file, thus it can be
edited by either the GUI or any text editor. At the time of writing this report the C3D GUI is being
updated to include most of the features in the C3D input file and may be downloaded when available.
This section of the document describes the contents of the C3D input file(s).
The input for C3D consists of an ASCII text file called C3d.inp. In addition to the primary input file,
there may be additional input files that have time dependent information (Table.inp, see Section 3.10),
or nozzle data. If additional input files are required, the format will be described in the appropriate
section.
Typically a user does not build a C3d.inp file from scratch, rather the user would pick an existing file
that has similar features to the problem at hand. Then C3d.inp file would be modified to suit the new
problem. This saves considerable debugging time, since the user would presumably have a file that
already works. When building a new model the user should keep in mind that the default condition is
that virtually everything is turned off, the user must turn on any feature or model before it is activated.
Comments can be inserted anywhere in the C3d.inp file, a by placing the letter c, in column 1. This
allows the user to place many reminders of format to write input files correctly without referring to this
manual. The comment lines are also quite useful to turn on or off or delete features or items without
deleting the line.
An ascii character * in the first column indicates a control keyword. C3D will attempt to read the
control keyword and that will determine the type of input which follows. Keywords are not case
sensitive, but the spelling must be correct. In addition, the order in which control cards appear is
important. The input file is separated into 7 sections in a specified order. The correct order is
*Time
*Equations
*Regions
*Object3d
*Object1d
*Coupling
*Output
Within each section there may be additional sub-section control keywords. Some of these sub-section
32
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
control keywords are optional. Skipping an optional keyword causes default values for those
parameters to be used in the code. The sub-section control keywords do not need a *end line.
The input file structure for C3D is shown below. Normally C3D input files are not this large. This
example was generated to include most of the possible input variations so that a user can quickly
see the correct input format. This example is not internally consistent, i.e. pointers may be defined
to parameters or other objects that may not exist. In fact, it cannot be made internally consistent
because there are too many options, some of which will conflict with each other. The intent of this
example is to demonstrate the proper format for input. It is not intended as an example that could
be executed successfully by the code. A simpler working example that can be copied and pasted
into a text editor (provided you have an electronic version of this report) is in section 7 of this
report.
Note that the numerical parameters are not column depended. The user can enter the numbers in
any column provided that the required number of numbers are entered, otherwise an error can
occur. The only characters that must appear in column 1 are the asterisk * for control keywords
or letter c for comments.
c
c Comment section of the input file
c any line that begins with c is interpreted as a user comment and is not read by the code
c
c
c
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c This section contains time step control
*TIME MaxStep PrintStep Time0 Restart option
100000 1 0.000 'w' 'rwtn1d'
c Tstop dt-max dt-min Courant DT-Fluid D-rho flamespeed DT-solid
30 .02 1E-05 1 1.2 1.2 2 1.2000
*end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c This section defines which equations to solve, numerical controls, and active models
*EQUATIONS
*multiblock 0.03
*MOMENTUM upwind crosswind Iter EOS-Error SOR Grav-X Grav-Y Grav-Z
'PRESSURE' 0.0000 .25 50 .002 1.25 0.0000 0.0000 -9.8000
*MOMENTUM
'1D' 1.0E+05 1000 0.6
*ENERGY upwind iter SOR
'2EQN' 1 15 1.25000
*SPECIES Name upwind iter SOR Mole-Wt 3d 1d Hf(KJ/gmole) Entropy(KJ/gmoleK)
phase
9 'c2h4' 1.0000 15 1.2500 28. 'ON' 'OFF' 52.87 219 'g'
'c2h2' 1.0000 15 1.2500 26. 'ON' 'OFF' 226 200 'g'
'h2' 1.0000 15 1.2500 2. 'ON' 'OFF' 0 131 'g'
'o2' 1.0000 15 1.2500 32. 'ON' 'OFF' 0 205 'g'
'c20' 1.0000 15 1.2500 240. 'ON' 'OFF' 0 5.7 's'
'h2o' 1.0000 15 1.2500 18. 'ON' 'OFF' -242 188 'g'
'co2' 1.0000 15 1.2500 44. 'ON' 'OFF' -394 213 'g'
'co' 1.0000 15 1.2500 28. 'ON' 'OFF' -110.5 197 'g'
'ch4' 1.0000 15 1.2500 16. 'ON' 'OFF' -74.8 186 'g'
c PC-Mass-Frac Emiss Tinf ViewFactor NVapors Fuel-Name Oxidant-name Soot-Name media-Name
*media 0.02 1. 300 'ON' 7 'c2h4' 'o2' 'c20' 'h2o'
c Species Correlation Scale-Factor
33
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
'c2h4' 'C2H2' 1.
'c20' 'SOOT' 1.
'co2' 'CO2' 1.
'h2o' 'H2O' 1.
'c2h2' 'C2H2' 1.
'co' 'CO' 1.
'ch4' 'CH4' 1.
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*CHEMISTRY N-Reac/Prod Coef Name Coef Name
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc Ethylene burn to 2h2o + c2h2 + co
4 'Flamespeed' 40 2 2 'c2h4' .33 1.75 'o2' 1
3 2.5 'h2o' 1.5 'c2h2' 1 'co'
11 000 1 400 2
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c 2 Hydrogen burn to h2o
'XGlobal' 2 1 'h2' 0.33 .5 'o2' 1
1 1 'h2o'
1e8 10000 1 400 0
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c 3 Acetylene burn to CO+h2+soot nucleation coef name pwr
'XGlobal' 2 1 'c2h2' 0.33 .9 'o2' 0.33
3 1.8 'co' 1 'h2' .01 'c20'
2e8 15110 1 300 2
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c4 cc Acetylene+soot=moresoot+h2 (soot growth) coef name pwr
'XGlobal' 2 1 'c2h2' 1 .01 'c20' .33
2 1 'h2' .11 'c20'
1e7 15110 0 300. 0
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*END
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Regions
C This section contains database for modeling parameters
*Fluid Type name w gam
'gas' ’n2’ 29 1.4
c----------------- fluid thermophysical properties -------------
*GasProp
C Temperature dependent tabular properties
'visc' 'data' 4 250 2e-5
500 3e-5
1000 4e-5
3000 6e-5
C Species and temperature dependent tabular properties
c prop type-corel species Ndata Temp Value
'CP' 'SPEC_TEMP' 'n2' 2 300.00 1040.0
2000.0 1284.0
'c2h4' 2 300.00 1535.0
2000. 4000.0
'c2h2' 2 300.00 1690.0
2000. 4400.0
'h2' 2 300.00 14000.
2000.0 17010.
'o2' 2 300.00 919.00
2000.0 1181.0
'soot' 2 300.00 710.00
2000.0 710.00
'h2o' 2 300.00 1864.0
2000.0 2836.0
'co2' 2 300.00 846.00
2000.0 1371.0
'co' 2 300.00 1040.0
2000.0 1294.0
'ch4' 2 300.00 1535.0
2000. 4000.0
C power law property for air
'Cond' 'PwrLaw' 4.81E-04 0.7
C constant value conductivity
'Cond' 'Const' 0.025
c------------------ fluid initial conditions -----------------
*GASREG Press Temp RhoVx RhoVy RhoVz Mass Fractions
34
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
35
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
c
c------------------3D Mesh Creation Parameters-------------------
*object3d 'Fire'
*MESH
c axis start stop number description
c zone1
'-xpwr' -80.0 0 14 'ouside fence'
'-xpwr' 0 19 21 'ouside fence to xmin bnd'
'xfix' 19 27.13 35 '3.m grid inside flares'
'xfix' 27.13 44.2 52 '3.m grid inside flares'
'xfix' 44.2 69.8 80 '3.m grid inside flares'
'xfix' 69.8 95.4 78 '3.m grid inside flares'
'xfix' 95.4 112.47 51 '3.m grid inside flares'
'xfix' 112.47 120 34 'to the left of inner fence'
'+xpwr' 120.0 139 21 'to xmax fence'
'+xpwr' 139.0 200 14 'to the left of inner fence'
c--------ygrid-----------------------------------------------------
'-ypwr' -70.0 4.5 10 'bnd to outer fence at 4.572'
'-ypwr' 4.5 16.25 10 'bnd to outer fence at 4.572'
'yfix' 16.25 78.25 186 'burner zone'
'+ypwr' 78.25 95 10 'above inner fence at 95m'
'+ypwr' 95 160 10 'above inner fence at 95m'
c--------zgrid--------------------
'zfix' -1 0.0 1 'ground'
'-zpwr' 0.0 2.400 5 'ground to burner zone'
'zfix' 2.400 4.800 8 'burner zone'
'zfix' 4.800 21.00 40 'burner zone'
'+zpwr' 21.00 100.00 20 'burner zone to top bnd'
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c------------------ 3-D geometric model definition---------------------------------
c
*geom
C Domain and Box, rectangular regions/objects
C type xmin xmax ymin ymax zmin zmax Gas Wall Pwr HT Turb Drag Orf
'DOMAIN' -80 27.13 -70.0 160 -1.00 100. 1 0 0 0 1 0 0 'Block1 Domain'
'Box' -80 200 -70 160 -1.00 0.00 1 1 0 0 1 0 0 'Floor'
C Elliptical Sphere, open cuts off the ends, normal esph has closed ends
c type axis x0 y0 z0 ymin ymax rady radxz
'open_esph 'y' 10 5.11175 10 5.1175 5.4516 .3341 1.0145 1 2 0 1 1 0 0 ‘name’
C Cylinder open cuts off ends, stair is stair step, cyl is normal closed end cylinder
c Cylinder axis x0 z0 ymin ymax rad
'open_cyl' 'y' 10 10 4.88315 5.11175 1.0145 1 2 0 1 1 0 0 ‘name’
‘stair_cyl' 'y' 10 10 .3365 4.88315 1.2446 1 2 0 1 1 0 0 ‘name’
'cyl' 'y' 10 10 .0 .3365 1.0145 1 2 0 1 1 0 0 ‘name’
c
c Sphere x0 y0 z0 rad
'sph' .1 3 4.4 .56 1 2 0 1 1 0 0
C Elliptical cylider
c ellip-cyl axis x0 z0 ymin ymax radx radz
'ecyl' 'y' 10 10 .3365 4.88315 1.2 3.3 1 2 0 1 1 0 0
c Plane xmin xmax ymin ymax zmin zmax (=crop box) Gas Wall Pwr HT Turb Drag Orf
'Plane' 2 4 1.4 6.3 1 10 1 2 0 1 0 0 0
c x1 y1 z1 x2 y2 z2 x3 y3 z3--- 3 points define a plane
8 1 1 1 9 2 1 1 7
c 3 points on the plane
1 2 3 3 3 3 8 5 2
c Sphere sphere-center radius
'Sph' 5 5 5 3.4 1 2 0 1 0 0 0
C wall is thin solid aligned with the cell edge, - not cell centered
c type xmin xmax ymin ymax zmin zmax Gas struc Pwr HT Turb Drag Orf
'Wall' -9 -4 1.1 1.1 -1.5 1.5 1 0 0 1 1 1 0 'thin wall'
c thin ring axis x0 z0 ymin ymax rad parameters
'RING' 'y' .6 0.0 9.15 11.7 .533 1 0 0 0 1 0 3
'windshield'
c Cone axis(focus)x0 y0 z0 x1 y1 z1 ymin ymax parameters
'Cone' 'y' 0.0 9.307 0.0 0.0 9.15 0.656 8.968 9.15 1 2 0 0 1
0 0 'cone-hat'
c
c------------------ 3-D global boundary conditions -------------
c
36
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Side Type
*BOUNDARIES Bnd-Limits
c start stop start stop Arguments……………
'ALL' 'CONC' 0.000 0.000 0.000 0.000 0 0 0 .233 0 0 0 0 0
'ALL' 'FLUX' 0.000 0.000 0.000 0.000 0.0000 297.00
'All' 'wind' 0.000 0.000 0.000 0.000 0 10 0
'zmax' 'HYDRO' 0.000 0.000 0.000 0.000 297.00
c zone1 Multizone type BC
'XMAX' 'block' 0.000 0.000 0.000 0.000 'xmax.bin' '../zone2/xmin.bin'
'xmin' 'block' 0.000 0.000 0.000 0.000 ‘xmin.bin’ ‘../zone0/xmax.bin’
C circular boundary condition shown below
c Radial pool xc yc rad tboil Hfg, cp Emiss Rate0 Time0 Max, MinRate Mass-frac-evaporate
'rzmin' 'evap' 10 10 3.58 450 3.E5 2200 0.95 0.072 2 0.25 0.01 1 0 0 0 0
'rzmin' 'conc' 10 10 3.58 1 0 0 0 0
*end
Cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
C the next section defines all of the 1-d subgrid type models
c------------------ 1-D user defined subgrid model -------------------
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*OBJECT1D 'DROW1'
*1DAUTO Start End Gas Struc Pwr H Turb Drag Orf Length Name
1 1 6 0 0 0 0 2 0 1.0000 'flare'
*BOUNDARY
'xmin' 'PRES3D'
'xmax' 'TIME' 1.0000 2.0000
*END
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*OBJECT1D 'Fence'
*1DAUTO Start End Gas Struc Pwr H Turb Drag Orf Wall_Thick Name
1 2 4 8 0 0 0 0 0 1.6E-03 '1/16 inch SS316 heat shield'
3 5 4 10 0 0 0 0 0 0.01 'radiation gap'
6 8 4 8 0 0 0 0 0 1.6E-03 '1/16 inch SS316 fence'
*BOUNDARY
'xmin' 'flux' 0 0
'xmax' 'flux' 0 0
'xmax' 'hrad' 20 .9 300 Hconv, emiss, Tinf
*END
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c--------------------- automatic 1-D subgrid model --------------------------
c
*object1d 'Cal'
*1Dauto nxi nxf Gas Wall Pwr HT Turb Drag Orf Len
1 10 1 1 0 0 0 0 0 .1
*Boundaries Side Type Arg1 Arg2 Arg3
'xmin' 'flux' 0 0
'xmax' 'flux' 0 0
*end
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c--------------User Defined Coupling between 3-D and 1-D subgrids --------
c this tells the code to read a file for a set of nozzles
*COUPLING 'USER' file-name 1-d model
1 'FILE' 'DROW1.inp' 'DROW1'
*ENDCccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c--------------Automatic Coupling between 3-D and 1-D subgrids --------
*Coupling 'auto'
C coupling by material type limits of box to search over
c # 1-d name search 3d-object-type Xmn Xmx Ymn Ymx Zmn Zmx
1 'Fence' 'BOX' 'ORF-2' 45 52 0.0 2.6 11. 13.
2 ‘wall’ 'box' 'orf-1’ 1 30 1 21 1 30
3 ‘cylinder’ 'box' 'struc-1’ 1 30 1 21 1 30
c thin wall coupling by 3d-object name
c # 1-d name search 3d-object-name Xmn Xmx Ymn Ymx Zmn Zmx
3 ‘Flat-Car’ 'box' 'flat_car' -20 20 0 9.25 -3.1 3.1
c
*END
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c----------------Output Parameters-------------------------------------------------------
*Output
c---------------Paraview------------------------------------------------------------------
*VTK delay dt xi xf yi yf zi zf start
37
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
0 .1 0 35 0 27 0 32 -1
c---------------GMV----------------------------------------------------------------------
*GMV delay dt xi xf yi yf zi zf gmv0
.0 .05 0 60 0 25 0 60 -1
c-------------ASCII Formatted at x,y,z positions-----------------------------------------
*Ascii pdelay dtplot ngroup
0.0 .5 2
'first group' 2 x y z
39.45 0 30
40.1 1 30
'2nd group' 2
49.45 0 30
50.1 1 30
*volhis (time frequency output is set by as *ascii line above)
C xmin xmax ymin ymax zmin zmax name
1 0.0000 0.74200 0.0000 0.90000 0.0000 1.1000 'HollowGbox’
c-------------ACSII Formatted USER Defined subgrids--------------------------------------
*Ascii_1du delay dtplot ndat i j
0.0 .1 2 3 8
1 6
c-------------ASCII Formatted AUTO 1-D subgrids at specified x,y,z coupling locations-----
*ASCII_1D delay dt groups
0.0000 .005 1
c group-name number-points
'Walls' 3 x y z 1d-cell
-59 3.25 57 1
-1 3.25 44.5 1
-98 3.25 44.5 2
c-------------Binary XPlot 1-D user subgrids distribution---------------------------------
*1DU delay dtdist # start nstop 1dU
0.0 .2 3 1 10 1
1 10 12
1 10 15
c--------------Binary XPlot Auto 1-D subgrid distribution at specified x-y-z location-----
*1D delay dtdist # x y z start stop
0.0 1 4 39.45 .61 30 1 20 ‘Distrib1’
39.45 1.83 30 1 20 ‘Distrib2’
39.45 3.00 30 1 20 ‘Cable'
39.45 4.00 30 1 20 ‘Ground’
c------Angular Surface distribution Temperature and Heat Flux ---------------------------
c*Surf1d = Binary XPlot formatted
c*Surf1d_ASCII = ASCII formatted
*Surf1d delay dt number axis xmin xmax ymin ymax
0 .5 1 'z' 0 6 2 4
c--------------Binary XPlot line distribution in 3-D grid parallell to x,y,z axis---------
*Binary-1D # delay dtdist # start stop I2 I3 dir
0 .1 2 2 6 26 15 'y'
2 6 26 16 'y'
c--------------Binary XPlot 2-d contour slices or projections of 3-D grid----------------
*Binary-2D # delay dt
4 0.0 .5
#Binary 2D filename axis start stop start stop plane
'pl2dz.bin' 'z' 0 30 0 30 15
'pl2dy.bin' 'y' 0 30 0 30 0
'pl2dy2.bin' 'y' 0 30 0 30 3
'pl2dx.bin' 'x' 0 30 0 30 15
*FLUX2D
0.000 2.5000E-02 3 'Y' 0.7570 0.7760 0.000 1.210 0.4100 'GapFlowHistory'
'Y' 0.8776 1.000 0.000 1.330 0.4100 'FrontPlateFlowHis'
'Y' 0.7570 1.000 0.000 1.330 0.4100 'Total Flow'
*end
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c------------END of Input File-----------------------------------------------------------
The various control regions in the input file have been separated by a line of comments (i.e. cccccccc)
in order to make the appearance of the file more readable.
38
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
In the following format description, an appropriate section of the input file will appear as a short
example in the description section. Thus, the user need not flip back and forth among the pages of this
document. In addition, each section, subsection, and data line will be highlighted. Optional items will
be enclosed in square brackets [...]. Default values where appropriate will be defined.
The first section of the input file defines the time step control parameters for the problem. An
example of this section of the input file is shown below.
###########################################################################
*Time nmax ipstep time restart
111000 5 0 'r'
# tstop dtmax dtmin courant dtemp drhog flamespeed dtwall
5.01 .01 1.e-3 .5 1.2 1.2 1.5 1.2
100 .1 1.e-3 1 1.2 1.2 1.5 1.5
*end
###########################################################################
*Time
A control card telling the code that time step control parameters follow
nmax
maximum number of time steps. The problem will terminate when nmax is reached or
when the physical time equals tstop, whichever occurs first.
ipstep
number of time steps between screen prints
time
initial start time
restart
A problem restart parameter. This is a character input, which is read in free format so it must
be surrounded by single quotes. Valid values are:
'n' None. Do not read or write a restart file
'r' Read a restart file
'rt' Read a restart file, and reset problem start time to zero
'rw' Read a restart file and write one at the end of the calculation
'rwt' Read a restart file, reset start time to zero, write restart at end of calculation
39
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
All of the restarts above would read both 3-d data and 1-d subgrid data. In many cases the
user may wish to leave the 1-d subgrids in their original setup state rather than the time
integrated state. This situation would most often occur when the number of subgrids has
changed, or the number of 1-d cell count has changed. In order to not read the 1-d
subgrids the user would append n1d to the restart parameter, where n1d means no-1-d.
Examples below
When choosing to restart a problem the user can change some parameters in the input file but not
all of them. For example, the boundary conditions can be changed, run control parameters, and
modeling parameters (such as heat transfer coefficients, material properties etc.). Things which
may not be changed in a restart are those which would leave regions undefined or scramble the
memory structure of the cell data. Examples are a change in the grid structure, number of
computational cells, the location, size, shape, or number of solid objects, number of chemical
species, and number of 1-D subgrids (except when using the n1d option). Note that subsequent
restarts of C3D will overwrite any existing output files that were written during earlier runs.
The next line(s) of data contains time step control data. The user can enter any number of lines of time
step control. The *end keyword tells the code when time step control data is complete. Some
problems may be best run with different values of time step control, for two reasons; 1., to control the
time step for problem stability, 2., to obtain intermediate restart files.
For problem stability, the user can run a problem with a small Courant number or other time step
control until rapidly varying dynamic phenomena stabilize, and then switch to another value at later
times. This option is useful if pressure oscillations are encountered due to initial conditions.
If the user wants to create restart files at multiple times, the code will produce a restart file at the end of
each time zone. The file name is called restart*.inp, where * is a number corresponding to the time
zone. The maximum number of restart files is 99, and the last restart file written when the calculation is
terminated is called restart.inp.
In the example shown above, three lines of time step control are included.
40
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Tstop
The stop time of the calculation, or if multiple time step control lines are read, then the time
over which the current time step parameters apply. The problem will terminate at the final
tstop time.
Dtmax
The maximum allowed time step
dtmin
The minimum time step during the calculation. This parameter is also the problem start time
step size. If time step controllers, such as the Courant condition, require a smaller time step
than allowed by dtmin then the problem is terminated and a message is printed.
Courant
The maximum allowed Courant-Friedrich-Lewy or CFL number. DtCourat= MIN(DX*CFL/Vx)
The fraction of a cell size that can be traversed by the velocity of the fluid in a single time step.
The entire 3-d mesh in all 3 directions is swept and the minimum Courant time step size is
found. This number can exceed 1 but may lead to poor transient accuracy, or may become
unstable, under some conditions.
Dtemp
The maximum fractional change in fluid temperature (Tn+1 -Tn ) / Tn+1 during a time step, where
n= time step number. Recommended value=1.2
Drhog
The maximum fluid density change per time step. Recommended value=1.2
Flamespeed
A multiplier on calculated flamespeed for ignition type problems. If combustion is not modeled
this parameter is not used.
Dtwall
The maximum structure temperature change per time step. Recommended value=1.2
*end
The end card for time step control parameters.
This section of the input file tells the code which equations to solve and which models to activate. This
includes momentum, energy, species, chemical reaction, 1-D momentum, participating media radiation
heat transfer, and chemical reactions. The user does not need to activate all of the equations. It is
41
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
recommended that only the equations that need to be solved are activated in order to keep the code
fast running.
##########################################################################################
*EQUATIONS
*multiblock 0.03
*MOMENTUM upwind crosswind Iter EOS-Error SOR Grav-X Grav-Y Grav-Z
'PRESSURE' 0.0000 .25 50 .002 1.25 0.0000 0.0000 -9.8000
*MOMENTUM eps1d CFL-1d fuwm1d
'1D' 1.0E+05 1000 0.6
*ENERGY1D
*ENERGY upwind iter SOR
'2EQN' 1 15 1.25000
*SPECIES Name upwind iter SOR Mole-Wt 3d 1d Hf(KJ/gmole) Entropy(KJ/gmoleK)
phase
9 'c2h4' 1.0000 15 1.2500 28. 'ON' 'OFF' 52.87 219 'g'
'c2h2' 1.0000 15 1.2500 26. 'ON' 'OFF' 226 200 'g'
'h2' 1.0000 15 1.2500 2. 'ON' 'OFF' 0 131 'g'
'o2' 1.0000 15 1.2500 32. 'ON' 'OFF' 0 205 'g'
'c20' 1.0000 15 1.2500 240. 'ON' 'OFF' 0 5.7 's'
'h2o' 1.0000 15 1.2500 18. 'ON' 'OFF' -242 188 'g'
'co2' 1.0000 15 1.2500 44. 'ON' 'OFF' -394 213 'g'
'co' 1.0000 15 1.2500 28. 'ON' 'OFF' -110.5 197 'g'
'ch4' 1.0000 15 1.2500 16. 'ON' 'OFF' -74.8 186 'g'
c PC-Mass-Frac Emiss Tinf ViewFactor NVapors Fuel-Name Oxidant-name Soot-Name media-Name
*media 0.02 1. 300 'ON' 7 'c2h4' 'o2' 'c20' 'h2o'
c Species Correlation Scale-Factor
'c2h4' 'C2H2' 1.
'c20' 'SOOT' 1.
'co2' 'CO2' 1.
'h2o' 'H2O' 1.
'c2h2' 'C2H2' 1.
'co' 'CO' 1.
'ch4' 'CH4' 1.
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*CHEMISTRY N-Reac/Prod Coef Name Coef Name
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc Ethylene burn to 2h2o + c2h2 + co
4 'Flamespeed' 40 2 2 'c2h4' .33 1.75 'o2' 1
3 2.5 'h2o' 1.5 'c2h2' 1 'co'
11 000 1 400 2
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c 2 Hydrogen burn to h2o
'XGlobal' 2 1 'h2' 0.33 .5 'o2' 1
1 1 'h2o'
1e8 10000 1 400 0
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c 3 Acetylene burn to CO+h2+soot nucleation coef name pwr
'XGlobal' 2 1 'c2h2' 0.33 .9 'o2' 0.33
3 1.8 'co' 1 'h2' .01 'c20'
2e8 15110 1 300 2
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c4 cc Acetylene+soot=moresoot+h2 (soot growth) coef name pwr
'XGlobal' 2 1 'c2h2' 1 .01 'c20' .33
2 1 'h2' .11 'c20'
1e7 15110 0 300. 0
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*END
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
42
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
in this control section of the input file will be solved when running the problem.
*multiblock dtime
This turn on the multiblock option for running C3D with multiple parallel CPU’s. dtime is the
time step between synchronization operations.
*Momentum
Type
The type of momentum solution. There are 3 options, 'Pressure', ‘Constant’ and 1-D.
A 'Pressure' option tells the code to solve for the momentum distribution by solving the
momentum, continuity, and Poisson pressure equations simultaneously. This is the one
normally chose for CFD type problems.
‘Constant’ includes no-flow solutions where all velocities are zero, such as in a conduction
solution. ‘Constant’ also includes velocity distributions imposed by the user, such as a constant
velocity everywhere. ‘Constant’ can also be used when reading a velocity distribution from a
restart file that was generated by a previous run and the user wants the velocity distribution to
remain fixed for the entire calculation. This option is useful when running a problem where the
user wants to turn on ray tracing for viewfactor radiation heat transfer. Ray tracing can be very
CPU intensive for large problems where millions of cells are used. The ‘Constant’ option will
allow the user to ray trace an existing flame distribution the first time step and then use that
distribution for all later time steps when calculating viewfactor radiation heat transfer from fires
or flares to surrounding objects.
A ‘1-D’ solution turns on the compressible momentum solver for 1-D sub-grids. 1-D sub-grids
can be turned on simultaneously with the 3-D solver, thus two *Momentum lines may appear
as in the example above. The 1-D solver has only a three arguments, eps1d, Courant1d and
fuwm1d. Eps1d adds artificial viscosity to the 1-D compressible flow algorithm. The
recommended value for eps1d is 0.5. Very large values (1e3) of Eps1d will force the flow in
the 1-d subgrid to be uniform, and is the recommended value for cases where injection of
material into the 3-d region is desired. Courant1d is the maximum allowable Courant number
in any 1-d subgrid. Courant1d can exceed 1 and can be any value when large values of Eps1d
are used. Large values are recommended to prevent constraining the time step size due to flow
in the 1-d subgrid. Fuwm1d is the fraction of up-wind momentum to use in the solution of the
1-d momentum equations.
Uwm
Fraction upwind differencing in the X, Y, or Z direction. The recommended value is zero,
43
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Xwm
Fraction crosswind differencing in the perpendicular X, Y, or Z directions. There are 3
momentum equations, and each momentum equations (for example the X direction
momentum) has advection terms from the cross wind directions (i.e X momentum advected
from the Y direction). The cross wind factor xwm specifies the magnitude of the upwind
portion of the term. The recommended value is 0.1, which will result in 90% central difference
and 10% upwind differencing. A value of zero is valid and will result in a full 2nd order accurate
central difference term but may have stability problems or jagged (noisy) solutions.
Ncor
The maximum number of elliptic solver iterations to execute when solving the pressure
corrector equation. The recommended value is 50. This is not identical to the global pressure-
iteration parameter described later. This specifies how many times to execute an alternating
direction implicit algorithm when solving matrices.
Errmx
Maximum allowable equation of state (EOS) error in pressure iterations. The parameter is
problem specific and may require experimentation by the user. Typically, a value 0.001 for
problems on the order of 10 meters in scale, and 0.0001 for problems less than a meter in scale
will result in suitable solutions.
Sor
Successive over relaxation parameter for the momentum equation. The recommended value is
1.2
Gx, Gy, Gz
Gravity in the X, Y, and Z directions.
*Energy
A keyword that turns on energy equation solvers. *energy1d turns on the 1-d subgrid energy
equation solvers. This latter option is useful when 3-d energy equation solvers are turned off as
in a static flow and temperature ray tracing solution where the user wants a solution for
surrounding 1-d structure temperatures. For example a fence temperature surrounding a fire or
flare.
Type
One equation (1eqn) or two equation (2eqn) solutions are options. A 1eqn solution has a single
structure or gas temperature in each cell. A 2eqn solution will have two temperatures in cells
that have both structure and fluid. The 2 equation option is the preferred option when solving
44
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
problems that has objects with curved boundaries (i.e objects such as cylinders), because the
curved boundary cells will have both solid and fluid present. The 2 equation option is required
for problems with 1-d sub-grids because the code is only set up to transfer energy that way.
The 1-equation option is used in CFD problems when objects have rectangular geometries line
up with the computational cell edges – i.e. bricks. The 1-equation option is numerically more
stable because it is solved in a fully implicit manner, whereas the 2 equation option is semi-
implicit and may need additional time step restrictions for stability.
Uwe
The fraction upwind differencing for the energy equation. Note that in contrast to the
momentum equations, the upwind and cross wind parameters are not separated.
Recommended values range between 0.2 and 1.0 – depending upon the degree of jaggedness
the user is willing to tolerate in the solution. Smaller values approach second order accuracy
but tends to have spurious numerical oscillations in parts of the solution where steep
temperature gradients occur.
Iter
The number of elliptic solver iterations in solving the energy corrector equation. The
recommended value is 20.
Sor
Successive over-relaxation parameter for the energy equation. The recommended value is 1.2
*Species
A keyword that turns on species equation solvers
Name
Name of species equation. An ASCII string surrounded by quotes such as 'fuel'. The specie
name is case sensitive and is used in identifying which specie equation to use in chemical
reactions, and material injection from 1-D sub-grids.
Uws
Fraction up winding in the species equation. Zero implies full central difference and one results
in full upwind differencing. The recommended value ranges from 0.2 to 1.0.
Iter
The number of elliptic solver iterations in solving the species corrector equation. The
recommended value is 10.
Sor
Successive over relaxation parameter for the species equation. The recommended value is 1.2
45
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
MW
The molecular weight of the species.
S
The entropy of the chemical species. The units are KJ/gm-mole-K
Phase
The physical phase solid liquid gas (‘s’ ‘l’ ‘g’) of the species. This parameter is only used
when modeling multiphase problems. Multiphase options are still under development and
not recommended for use at the present time. Nevertheless a value must appear in the line.
*Chemistry
Keyword which turns on chemical reaction equation input. The chemical reaction equations are
limited to forward direction irreversible reactions. Equilibrium reactions can be entered as both
a forward and reverse reaction equation, i.e. two equations.
46
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
nreac
The number of chemical reactions to enter. Example above has 2 reactions, but the user can
enter as many as 20 separate reactions.
type
The type of chemical kinetics model. There are 3 options for chemical reactions, XGlobal,
Flamespeed, and Arrhenius. Previously there were several more options but the global form
includes all of the other reaction types, therefore the others are deprecated. Arrhenius is a first
order reaction model that is suitable for decomposition reactions.
Flamespeed is a reaction type that allows ignition of fuel based upon flame propagation and
local temperature. For flamespeed reaction type, the number immediately following is the
minimum flame propagation speed in meters per second. The actual flame speed can be higher
if pressure builds up and causes rapid expansion of the combustion products.
Where :
dA/dt is moles consumed in the reaction (moles/sec)
K is a pre-exponential coefficient
A is moles of the first reactant
C is moles of the second reactant
T is temperature (K)
b, d, p are exponents
Ta is activation temperature = Ea/R, Ea is activation energy and R universal gas
constant
The coefficients in the chemical reaction input are in units of moles. Previously mass units were used
but this proved to be too cumbersome especially when new fuel types were added.
Nreac
The number of chemical reactants
CoefR
The molar coefficient of first reactant. The coefficient of Xglobal is mole based. Previously
mass based coefficients were used, but they turned out to be too clumsy and time consuming
for the user to derive if the chemistry is being varied. With mole based coefficients the user can
determine at a glance if the chemistry is balanced.
47
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
SpecR
The species name of the chemical reactant. The name must have the same spelling, and case
sensitivity, as the name specified in the species equation.
Nprod
The number of chemical products, this can be any number
CoefP
The molar coefficient for chemical products. The sum of chemical elements in the reactants
and products must be equal. The code will not check elemental balance so the user must insure
that elements balance on both sides of the reaction equation otherwise species and energy will
not be conserved.
SpecP
The name of the chemical product. This must be one of the species names.
K
The pre-exponential coefficient for the kinetic rate of chemical reaction
E/R
The activation energy divided by the gas constant. The units must be in K
EB
Fraction Eddy Breakup. This parameter turns on (1) or off (0) the eddy breakup time delay in
the chemical reaction rate. Fractional values are allowed.
Tmin
The minimum temperature for the chemical reaction. The code will only calculate chemical
reaction if the fluid temperature in the computational cell exceeds Tmin.
TP
Temperature exponent. In the global reaction a-rate the last parameter is the exponent of local
temperature. This exponent is typically zero, or 1. It allows the modeling of Eyring type
chemical reactions.
48
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
diffusive radiation or soot model, thus the user must define all the chemical species and reactions in the
soot model. The chemical reactions and soot parameters in the example input file have been adjusted
to approximate existing experimental data.
*media
This keyword turns on the diffusive radiation heat transport model
PC-Mass-Frac
Is the fire surface concentration of product-of-combustion (PC). Values of PC fraction greater
than Surf-Conc are inside the flame zone, and values less than are outside. A typical value for
Surf-Conc is 0.06 for h2o species. Cells within the flame zone use the media dependent
extinction coefficient model to define the radiation conductivity.
emiss
The gas emissivity weighting factor of the fire surface cells. The recommended value is 1.0.
This scale factor multiplies the internally calculated fire surface emissivity.
tinf
The ultimate environment heat sink temperature to which the fire surface cells radiate.
viewsurf
this character string turns on, or off, the clear air surface to surface view-factor radiation
model. This parameter is not the same as flame ray-tracing which is turned on by another
option described later.
nvspec
This parameter defines the number of gaseous species to use when calculating the Rosseland
mean absorption length for diffusive radiation.
For nvspec > 0, the user must enter nvspec pairs of names that correlate a radiation extinction
coefficient model with a species type and a scale factor. The first word is the case sensitive
species name used when defining species equations. The second word selects which of the
built in gas emissivity correlations to use. There are 12 possible choices, Soot, H2O, CO2, CO,
C2H2, CH4, SO2, NH3, C7H16, C3H8, NO, N2O. If the user wants to model a species other than
shown, the closest choice should be made. The scale factor multiplies the value derived from
49
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
the built in theoretical correlation so that the user can scale the built in curve to other similar
species – or account for non-ideal effects. If the calculated extinction coefficient does not
agree with experimentally measured values, then one would use a scale factor that allows
agreement. Such a scale factor allows the built in correlation to model non-ideal effects such as
radiation scattering, or clumping of particles, oily soot etc. A scale factor of 1.0 would use the
built in correlation as is. A scale factor of 2 doubles the extinction coefficient of the built in
curve. These correlations can be used more that once
Other models may be activated by including the following lines. Using these options can allow the user
to enter values different from the default values in the code.
*Diff_reac Scale-factor
This parameter has one argument, scale-factor, which is a proportionality constant that
multiplies the effective mixing time when using the eddy dissipation combustion model. The
mixing time is added to the Arrhenius chemical kinetics reaction time to create a net reaction
rate. The reaction rate is used as a source term in the species and energy equations. The
recommended scale factor is 1.0. Larger values will increase the reaction time (slower reaction
rate), and smaller values will reduce the reaction time (higher reaction rates). The default scale
factor value is 1.0.
*Viewfac Vmin
This parameter affects on surface to surface viewfactor radiation. It has one argument, the
minimum viewfactor Vmin. When calculating surface to surface viewfactors, and values below
the minimum viewfactor will be ignored. Zero is a valid number however it is quite easy to
create many millions of viewfactors in a practical problem. As a practical matter a minimum
viewfactor of approximately 1e-5 or 1e-6 results in sufficiently accurate results without too
many viewfactors. Since memory is allocated at the beginning of a problem the user can choose
this parameter based upon computer memory size and speed. The default value for Vmin is 1e-
6
*Viewdist distance
This parameter affects the maximum separation distance for ray tracing or viewfactor calculations. If
50
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
the separation distance is greater than the input value distance then the viewfactor calculation is
skipped. This parameter is useful when calculating viewfactors is very large problems with millions of
cells to speed up the calculation.
*NORAD
This parameter turn off all viewfactor radiation.
*Multiphase
This parameter turn on multiphase routine that model mixtures of solid, liquid and gas. This
option is only partially implemented in C3d and not ready for general use.
*Transmissivity rh tinfenv
This parameter turns on radiation absorption due to atmospheric CO2 and H2O. Two
parameters are input rh=relative humidity in %, and tinfenv=environment temperature K
*CSootThin mass-frac
This parameter will cause the code to calculate a thin optical solution for radiative participating
media outside the flame zone defined in the *media line. The mass-frac parameter is the lower
bound of media mass fraction for calculating optically thin radiation.
*Clearsoot tclear
This parameter removes all soot species outside the flame zone and at temperatures below
tclear. This option is included for those users that are experimenting with soot production
models and do not wish to re-run a calculation from scratch.
*PolyAreaMin minarea
This parameter skips all surface polygons with an area less than minarea. This option is useful
when importing an STL file that is very large and has fine detail that is not important to the
problem.
*FillVoid
This parameter fills all void spaces with solid inert material that may be created when using
either the C3D solid modeler or when importing an STL file. Voids can sometimes cause
instabilities in the momentum solver due to the inability to communicate with the rest of the
fluid in the problem.
51
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
This parameter sets a boundary condition exit flow based upon a sum over all mass sources in
the domain. This parameter is particularly useful when simulating enclosed furnaces where the
combustion nozzles provide a source of mass and the user must set a balanced exit flow.
Pressure flow BC’s could be used but may result in too much or too little flow depending upon
their location. In practice furnace operators will adjust an exit damper to achieve the desired
flow which would be a mixture of combustion nozzle sources and infiltration from leaks, doors
etc. There are two arguments, arg1 is either ‘on’ or ‘off’ and arg2 is a multiplier on the exit
flow rate. A multiplier of 1.0 will exactly balance the mass sources. This option requires the
use of a ‘VEXIT’ boundary condition somewhere on the domain boundaries.
*IterChem number
This parameter sets the number of chemical reaction iterations used in solving the simultaneous
chemical reaction equations. The default value is 1, the user can reset it to any value with this
parameter.
*Tadiabatic temp
This parameter sets the maximum possible temperature for fluids in the domain. Numerical
stability can sometimes overload a cell with too much reactable species or energy resulting in
temperatures that exceed the adiabatic flame temperature. This will allow the user to set a
maximum temperature in a cell to be the user input value.
*TStruc1D arg1
This parameter causes the code to sweep over all 1-D subgrid temperatures made of material
pointer arg1 and print the temperature and location to a file. This is useful if the user wants to
know both where and what the maximum temperature is (for example in a heat exchanger with
hundreds of pipes).
*TSTRUC arg1
This parameter causes the code to sweep over all solid material temperatures made of material
pointer arg1 and print that temperature and location to a file. This is useful if the user wants to
know both where and what the maximum solid temperature is.
*End
This keyword turns off the equation input
52
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
3.5 Modeling Parameters, Material Properties, and Correlations for Heat and
Momentum Transfer
This section allows the user to set up modeling parameters that may be used in defining the
problem. It includes initial conditions, heat and momentum transfer correlations, material and fluid
properties, turbulence model parameters, and mass and energy source term parameters. The user
will select which properties, correlations, etc. to use when defining the problem in the next
(geometry) section by the use of integer pointers to the definitions in this section.
Including numerous models and parameters in this section of the input file does not activate those
models or parameters. It just supplies data that can be used later when setting up the actual
problem by way of integer pointers.
###########################################################################
*Regions
#
*Fluid Type w gam pres0 name
'igas' 29 1.4 0.82e5 'air'
*GasProp
'Visc' 'Constant' 2.e-5
'Cond' 'PwrSeries' .035 0.001 -0.0001 0.0
'Cp' 'spec_temp' 'air' 3 300 1000
1580 1250
2000 1350
'fuel' 2 300 2200
2000 2200
'o2' 3 300 1000
1580 1250
2000 1350
'soot' 2 300 2000
2000 2000
'intr' 2 300 2200
2000 2200
'oil_pc' 2 300 1100
2000 1500
*GasReg # press temp rux rvy ruz m1 m2 m3 m4 m5
1 .82e5 300 0. 0 0 0 0.233 0 0 0
*Struc # Key temp Kg/m3 K c M2/m3 emis hext tinf alpha ‘name’ mass frac
1 'Con' 300. 803. 0 1e5 0 0 0 0 1 'isolator' 0 0 0 0 0
2 'Con' 450. 803. .9 1e5 0 .5 0 477 1 'fuel1' 0 0 0 0 0
3 'Con' 300. 803. 0 1e5 0 0 0 0 1 'pool1' 0 0 0 0 0
4 'Con' 300. 803. 0 1e5 0 0 0 0 1 'Air Supply' 0 0 0 0 0
5 'Con' 300. 6000. 25 300 0 .95 0 477 1 'HGF Face' 0 0 0 0 0
6 'var' 300. 7920 0 .75 0 300 1 'Calorimeter Steel'
'tk' 'data' 4 273 13.3978
373 16.3285
773 21.7714
973 25.9582
'cp' 'data' 3 273 502.416
673 565.218
1140 645 linear extrapolation
*Power Reg Key power(m),period(m),pdelay(m),tpwroff(m),fgw(m)
1 'Exp' 1e5 .001 0.0 1e10 1
*Heat Reg Key a *Ren **B * Pr**c + d Hdia
1 'h' 5
2 'Cyl_Cross' 0 .3
3 'Grash_V' 0 .1
*Drag Reg Key eps Hdia
1 'Moody' .001 .5
2 'moody' .03 .5
*Turb Reg Key Type coef
1 'EDDY' ‘LES' .15 'LES'
cc Type coef (ax (x - x0) + by (y-y0) + cz ( z-z0) ) **d + e
2 'Eddy' 'LES2' .05 0 0 .1 2.8 0 0 1 .001
*Orfice Reg Key %Areax Coefx %Areay Coefy %Areaz Coefz
53
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
1 'Normal' 0 1 0 0 0 0
2 'Normal' 0 0 0 0 0 1
*end
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Regions
This keyword turns on the modeling parameters definitions part of the input.
*Fluid
This keyword tells the code that a fluid definition follows.
Type
This defines the fluid type. There are two options, 'Gas,' and 'Liquid.' Gas uses the gas
equation of state and a compressible flow solver, thus the pressure can vary with position
and time. Liquid uses a constant density (incompressible) solution with Boussinesque
approximation for liquid density in thermal applications.
Name
The second entry is the name of the fluid. This name must not be the same as a specie
name. This name is used in establishing fluid identity when evaluating specie-dependent
thermophysical properties.
54
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
W
Molecular weight of the background fluid. Note that when species equations are included
additional molecular weights are included in the equations section of the input file. The
background fluid is defined as the molecular weight of the fluid that has a mass fraction 1
minus the sum of all the other species at any location of the problem. Thus, a user need
only solve one specie equation for problems with two species, because the background
fluid is assumed to occupy the space not occupied by the species being tracked.
If the fluid is 'Gas' (compressible gas) then one additional argument follows
Gam
The ratio of specific heats of the fluid.
If the fluid is Liquid (incompressible, constant density fluid with Boussinesque equation of
state), then three arguments must follow. Note that if an incompressible gas is modeled
then use the appropriate parameters for the gas.
Rhol
The density of the liquid.
Beta
The volumetric expansion coefficient of the liquid.
Temp0
The temperature at which the fluid has density Rhol.
*GasProp Type
*GasProp Property Correlation values or parameters
'Visc' 'Constant' 2.e-5
'Cond' 'PwrSeries' .035 0.001 -0.0001 0.0
'Cp' 'spec_temp' 'air' 3 300 1000
1580 1250
2000 1350
'fuel' 2 300 2200
2000 2200
'o2' 3 300 1000
1580 1250
2000 1350
'soot' 2 300 2000
2000 2000
'intr' 2 300 2200
2000 2200
'oil_pc' 2 300 1100
2000 1300
*GasProp tell the code to read the thermophysical property data for the fluid. There are at
least three, or optionally four properties and they may be entered in any order. They are:
the specific heat at constant pressure 'Cp,' the viscosity 'Visc,' the conductivity 'Cond,' and
optional - mass diffusivity [‘diff’]. If mass diffusivity is not defined then it is derived from
the thermal conductivity with the Lewis number unity approximation. In the input file the
property being defined is denoted by the appropriate keyword in quotes. The rule to be
used in calculating the property is defined by any of the following keywords:
55
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
'Constant'
A constant value of the property data is entered.
'DATA'
A temperature vs. property data list, which is treated as piecewise continuous. The first
line contains the number of data pairs plus the first pair of data. The first line is followed
by the rest of the pairs of data. Each data pair consists of Temperature and Value.
'Spec_Temp'
A species and temperature vs. property data list, which is treated as piecewise continuous.
The first line contains the species name, the number of data pairs, plus the first pair of
data, followed by the rest of the pairs of data. Each data pair consists of temperature and
property value. There must be nspecies + 1 entries. The first specie is the background gas
(air in most cases). This is followed by the data for the rest of the species. The order of
entry is important, they must be entered in the same order as the names of the specie
equations.
'PwrSeries'
A power series curve fit of the form a + bT + dT2 + dT3 , where the user supplies the
values a,b,c, and d. All four values must appear even if they are zero.
'PwrLaw'
A power law fit of the form ‘Value = a Tb.’ The user must supply the values a and b as
two arguments and T is the temperature of the fluid in Kelvin.
'CurveFit'
A third degree (or less) polynomial curve fit to the data is used. The curve fit is exact so
that the user must judge how well both interpolations and extrapolations will be over the
temperature range of the problem. With this keyword defined, the code expects to read a
number, which tells how many data pairs to read. A maximum of four data pairs is
allowed. The data pairs consist of temperature and value.
'Chapman'
This keyword refers to the Chapman-Enskog theory for thermophysical gas properties. If
this keyword is defined then two parameters must follow, they are:
sigma
The Lennard-Jones molecular cross section. These cross sections are printed in
several text books for heat and mass transfer, such as: Bird, Steward and
Lightfoot, or Edwards, Denny and Mills.
epsok
The molecular collision force parameter.
If the 'Chapman' keyword is chosen, the specific heat Cp for the gas is calculated as:
56
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
R
Cp , (26)
W 1 1
where R is the universal gas constant (8314 in S.I. units), W is the molecular weight, and is the
ratio of specific heats. This formula is valid for perfect gases.
*GasRegions
A keyword that turns on fluid initial conditions definitions.
reg
A pointer for the different gas regions.
Press
The initial condition gas pressure.
temp
The initial condition gas temperature.
rux
The initial condition x momentum ux.
rvy
The initial condition y momentum vy.
rwz
The initial condition z momentum wz.
57
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*Structure # Key Temp Kg/m3 K c m2/m3 emis hext tinf %solid mass-fractions
*Struc # Key temp Kg/m3 K c M2/m3 emis hext tinf alpha ‘name’ mass frac
1 'Con' 300. 803. 0 1e5 0 0 0 0 1 'isolator' 0 0 0 0 0
2 'Con' 450. 803. .9 1e5 0 .5 0 477 1 'fuel1' 0 0 0 0 0
3 'Con' 300. 803. 0 1e5 0 0 0 0 1 'pool1' 0 0 0 0 0
4 'Con' 300. 803. 0 1e5 0 0 0 0 1 'Air Supply' 0 0 0 0 0
5 'Con' 300. 6000. 25 300 0 .95 0 477 1 'HGF Face' 0 0 0 0 0
6 'var' 300. 7920 0 .75 0 300 1 'Calorimeter Steel'
'tk' 'data' 4 273 13.3978
373 16.3285
773 21.7714
973 25.9582
'cp' 'data' 3 273 502.416
673 565.218
1140 645 linear extrapolation
*Struc
A keyword that turns on structure definitions.
#
A pointer for the structure type definition.
Key
The structure type keyword. There are two type keywords, 'Con' and 'Var.' 'Con' refers
to constant properties, and 'Var' refers to variable thermophysical properties. If ‘VAR’ is
chosen, values of thermal conductivity (Tk) and specific heat (Cp) are entered as tabular
values (a list of temperature, value) after this line. More detail on ‘VAR’ option appears
below.
Temp
The initial temperature of the structure.
kg/m3
The density of the structure. The mass of structure in a cell is the product of its density
and its volume fraction (%solid).
If the properties are constant (keyword ‘Con’) then enter the following two values:
K The structure thermal conductivity. If a value of zero is entered then the structure
will not transfer any heat to the fluid by conduction or to neighboring cells. However a
value of zero does not turn off conduction, convection or radiation to 1-D subgrids.
58
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
If the thermophysical properties are variable (keyword ‘VAR’) then there are three
options then the material property can be a function of temperature (and possibly species).
The next line contains two keywords and the first data pair.
Keyword 2 defines the type of property correlation. ‘DATA’ for a set of temperature-
property data pairs, ‘POLY’ for a cubic polynomial, ‘CONST’ for a constant value, or
‘Spec_Temp’ for species and temperature dependent properties.
If keyword 2 is 'DATA' then enter number of data pairs (ndata) followed by the
first data pair of temperature and property value. This is followed by ndata-1 lines
of data pairs. This format is shown in the example above.
If the second keyword is 'poly,' then enter six numbers, the first four numbers are
the coefficients of the cubic polynomial fit through the data, the last two are the
max and min value respectively.
If the second keyword is 'CONST,' then enter the constant value of the property.
If the second keyword is 'Spec_Temp,' a species and temperature vs. property data
list is entered, which is treated as piecewise continuous. The first line contains the
species name, the number of data pairs, plus the first pair of data. This is followed
by the remaining pairs of data. Each data pair consists of temperature and property
value. There must be nspecies entries. This is followed by the data for the rest of
the species. The order of entry is important, they must be entered in the same order
as the names of the specie equations.
Next repeat the procedure for the second data set (CP or TK).
m2/m3
The surface area per unit volume for convective heat transfer to porous media. The
surface area for heat transfer within a computational cell is determined by multiplying this
parameter by the volume of the cell. A value of zero will turn off convective heat transfer.
This surface to volume ratio is only used when porous media is being modeled. If the
structure is 100% solid, the code will calculate the surface area internally. Note that heat
transfer coefficients must be turned on in order to exchange energy.
Emis
A surface emissivity for the structure for radiative heat transfer, see tinf below for ambient
conditions.
59
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Hinf
A heat transfer coefficient to an ambient temperature. See Tinf next.
Tinf
The ambient (environment) temperature for radiative and convective heat transfer defined
above.
alpha
The volume fraction (0 to 1) of solid material in the structure. A value of 1 implies solid
structure, which has zero flow velocities and gas densities. A value less than 1 is assumed
to be porous structure with the balance of the cell volume being flow volume. This
parameter affects the mass of structural material within a computational cell. The structure
mass within a cell is determined by multiplying the material density ‘Kg/m3’ parameter
times the cell volume times the ‘alpha’ parameter. This parameter also affects conductive
heat transfer by its effect upon the cell-to-cell contact surface area. The surface area for
conduction heat transfer within structures is assumed to be the product of the
computational cell interfacial area times alpha. The contact area for gas to structure
conduction is assumed to be the computational cell interface area times (1.0 - alpha). This
parameter has no affect upon the specific heat of the structure or on convective heat
transfer.
name
A name for the structure. The name must be surrounded by single quotes and no longer
than 20 characters.
[m(i)]
The initial mass fractions of the species in the solid phase. These are optional input
parameters. If they do not appear, all initial species mass fractions are set to zero. If the
mass fractions are entered, there must be nspec entries, otherwise an error will occur.
60
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
square wave, a table of values vs. time, and a mass source rate.
Reg
A pointer for a power type. If the pointer is negative then a spatially distributed power region
is being modeled. If space dependence is modeled the code will open a file called profile.inp
and will attempt to read a set of power distribution numbers. There may be more than one
shape distribution, therefore each must be identified by a name. If a negative pointer is
encountered the name must be input as an ASCII string at the end of the data line. The format
for the file profile.inp is shown in the example below
'Core'
'power' 14 17 1
.479 .489 .479 .480 ............................
.488 .490 .491 .492 …………………
The first entry 'Core' is a name that appears in the C3d*.inp file at the end of the data
line. The second line indicates the type of distribution that is being modeled, followed
by the number of X, Y, and Z computational cells. The code will check to make sure
the correct number of data entries are in the file. The last line indicates the data, which
is looped in the X, Y, and Z directions consecutively. The data in the file profile.inp is
normalized to 1 such that:
f (i,j)V (i,j)
= 1 (3)
V (i,j)
where the f(i,j) are user input values for the power distribution, V(i,j) are the volumes of
the computational cells.
Key
The power time history keyword. There are currently 5 keywords for power. They are
'Gaussian', 'Exp', Square, and 'Table' and 'Mass'. Depending upon the keyword the code will
expect to read a different numbers of arguments as explained below.
W/m3 The volumetric power generation rate in Watts per cubic meter. (Note, this parameter
61
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
is input for all of the different types of power generation keywords). If a distributed
power region is being defined then the local average volumetric power is the product
the distribution shape function, and the W/m3 parameter.
Fgas The fraction of generated power in the fluid. The balance (1-fgas) is placed into the
structure (if there is any within the cell)
For 'Exp' keyword an exponential form is assumed and the following parameters must be input
Period The exponential period of power up and power down. If a square pulse is desired then
the periods can be set to a very small value, such as a microsecond.
Pwr-on The time at which power is turned on, after which the power ramps up with the
assigned period.
pwr-off The time at which power is turned off and decreases with the same period.
Fgas The fraction of the power that is generated in the fluid. The balance (1-fgas) is placed
into structure.
For 'Square' keyword a square wave (on, off) form is created. The following parameters must be input
fgas The fraction of the power that is generated in the fluid. The balance (1-fgas) is
deposited into any structure in the same computational cell.
For 'Table' keyword a numerical table of values vs. time will be read from the file table.inp. For this
keyword the following values are expected.
62
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
W/m3 The volumetric power generation rate in Watts/m3. This parameter multiplies the
power level read from the table.
Ncol The data column number for the amplitude of the power. Note that the format for
input in Table.inp is:
time, column1, column2, column3, column4, ....
fgas The fraction of the power that is generated in the fluid. The balance (1-fgas) is placed
into structure.
For 'Mass' keyword a numerical table of mass source values vs. time will be read from the file table.inp.
For this keyword the following values are expected.
Rate The mass generation rate scale factor. This parameter multiplies the mass source rate
read from table.inp. This allows the user to change the rate without re-writing the table.inp file. The
units for the mass source rate are kg/sec.
Ncol The data column number for the magnitude of the mass source. Note that the format
for input in Table.inp is:
time, column1, column2, column3, ....
temp The temperature of the mass source. This temperature is held fixed for the duration of
the calculation.
63
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*Heat A keyword that defines the heat transfer coefficients parameters and types.
Depending upon the keyword, a different number of parameters may be input as follows
‘H’ Value
Input a constant value of heat transfer coef in W/m2-K
64
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
object. If a bulk temperature of zero is entered, the code will use the locally computed
temperature in calculating both Grashoff number and heat transfer coefficient.
'Nusselt’ a b c d hdia
Input four parameters general heat transfer coefficient of the form Nu = a Reb Prc + d, where
Nu = Nusselt Number
Re = Reynolds Number
Pr = Prandtl Number
Note that in evaluating the Reynolds number the local gas velocity is used. For porous media
the superficial gas velocity is equal to the local velocity times (1.0-% solid). Thus, the user
must adjust the coefficients "a" and "b" as required depending upon the definition of the heat
transfer coefficient and its intended usage.
hdia
The Hydraulic diameter used in the Reynolds and Nusselt number definitions
'Lam/Turb' a,b,c,d,Hdia
Keyword the all of the data in the 'Nusselt' form shown above must be entered for the laminar
flow region followed by a line of data for the turbulent flow region:
a,b,c,d,Re-cr
a
The turbulent a parameter for the standard heat transfer correlation
b
The turbulent b parameter for the standard heat transfer correlation
c
The turbulent c parameter for the standard heat transfer correlation
d
The turbulent d parameter for the standard heat transfer correlation
Re-cr
The critical Reynolds number for transition to turbulence
F(r)
The 'f(r)' Keyword defines a position dependent heat transfer coefficient. The following data
must be input
a
A parameter for a position dependent heat transfer coefficient of the form
Nu = a Rexb Prc + d, where
Nu = Nusselt Number
65
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
b
The b parameter in the heat transfer coefficient formula
c
The c parameter in the formula
d
an additive constant in the formula
X0,Y0,Z0
The x,y,z position from which to measure distance. If X0 is zero, then the position dependence
is in the y and z direction only, likewise for the other directions. If the user wants to measure
distance from the actual zero coordinate, use a very small number (i.e. 1e-10)
*Drag
A keyword that activates drag coefficient models. Drag coefficients apply a flow resistance
opposite the direction of flow. They are normally associated with porous media but the user
can use these formulas to represent any type of flow resistance that is not resolvable with the
grid.
#
A pointer for the drag coefficient
Key
The drag coefficient keyword. There are currently 5 different types of keywords for drag.
They are 'Reynolds', 'Lam/Turb', 'Moody', f(r), 'DragCoef'
1 x
P = V 2 [ (a Reb + c) ]
2 hdia
66
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
For the Keyword 'Reynolds' The drag formula is assumed to have the following form:
and the following parameters must be input.
A
The a parameter in the above formula.
B
The b parameter
C
The c parameter
Hdia
The hydraulic diameter used in the drag formula
Keep in mind that all of the velocities in the formula above are local velocities not superficial
velocities, thus the constants must be defined appropriately. For example, the Ergun equation
for pressure drop for flow through porous media is defined according to superficial gas
velocities. However since C3D is calculating friction based upon local flow velocities the
values of a and c will be different.
For the 'Lam/Turb' Keyword the all of the data in the 'Reynolds' form shown above must be
entered for the laminar flow region followed by a line of data for the turbulent flow region:
Re-cr
The critical Reynolds number for transition to turbulence
For the Keyword 'Moody' The drag formula is assumed to follow the Moody chart for pressure
drop in pipe flow. The following parameters must be input.
The relative roughness of the pipe wall, (m)
Hdia
The hydraulic diameter used in the drag formula (m)
For the keyword f(r) the assumed drag formula is shown in the equation below:
67
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
1 | x - x o|
P = V 2 [ (a Rebx + c) ]
2 hdia
Where the Reynolds number is now position dependent. The following parameters must be
input:
a,b,c,d
X0,Y0,Z0 The x,y,z position from which to measure distance. If X0 is zero then the position
dependence is in the y, and z directions only. The same rule applies to the y and z directions. If
the user wants to measure distance from a zero coordinate position, use a very small number
for the zero position (i.e., 1.e-10)
'Drag'
the drag formula for this option is shown in the equation below:
1
P = V 2 Cdf
2
Cdf
The form loss coefficient for flow
68
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*Turb
A keyword that turns on flow turbulence models
Pointer
a number defining the turbulence model
Key
a keyword that describes the type of turbulence model. Currently the only keyword available is
eddy viscosity, which is defined by the 'EDDY' Keyword.
Type
The ASCII string defining the turbulence model type. There are several options and each
option has a different number of associated parameters.
'Grid' 6 parameters
An algebraic turbulence model, which models the turbulence found downstream from a
mesh or grid. 6 turbulence parameters are expected for this type of model.
'Constant' 1 parameter
A single constant value of eddy diffusivity is input, units of m2/sec
'1-Eqn' 3 parameters
A one-equation LES (kinetic energy transport) model of turbulence. Three parameters
are input, the lead coefficient, the maximum length scale, and dissipation coefficient.
'LES' 1 parameter
A large eddy model, where turbulence is modeled by velocity derivatives, and the
length scale is the minimum of ½(dx+dy, dx+dz, dy+dz). A single proportionality
parameter is input, typical value is 0.15.
'LESmx' 2 parameters
A large eddy model (LES), where turbulence is modeled by velocity derivatives, and
the length scale is the minimum of ½(dx+dy, dx+dz, dy+dz) or the user input constant.
The first parameter is the LES proportionality constant (0.15) and the second
parameter is the maximum length scale. This is useful where a variable grid is defined
with cells that grow to be very large and the user does not want the turbulence to be
overestimated due to large scale lengths.
'Ren' 4 parameters
A Reynolds number formulation, where Reynolds number is calculated from the local
velocity, viscosity, and an input length scale. 4 parameters (A,B,C, Hydraulic length)
are input. The formula for eddy diffusivity is:
69
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Heat transfer across an orifice can be modeled by a 1-D subgrid so that the user can place many
materials within the orifice. When using a 1-d subgrid with an orifice the subgrid includes two
surfaces, corresponding to both sides of a thin plate. This feature is useful in heat transfer
situations where a thin structure with possibly a radiation gap is being simulated.
*Orifice
A keyword that turns on orifice definitions.
#
A pointer for the orifice.
Key
Keyword for the orifice. There are two allowed keywords, 'Normal' and 'Time.' Normal
refers to a simple orifice and Time refers to a time-dependent orifice such as a valve.
For the keyword 'Normal,' Input the following data pairs in all three principal directions:
%Areax
The face area ratio of the orifice on the x interface of the cell. If there is a structure on
either side of the orifice then the ratio refers to the area ratio that is based upon the
reduced flow area due to the structure.
70
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Coefx
An orifice coefficient in the X direction.
Note that values of %area and Coef applies to the formulae for a pressure drop across a
computational cell interface, which is:
Coef 1
P ( u ) x,i , j V 2
1 , (31)
2 ratio
Where the value of momentum flux and velocity are the local values at the i, j cell
interface. If a structure is present on either side of the interface, then the mass flux and
velocity will be increased by 1/(void-fraction) compared to the smeared value.
The %Area and Coef are repeated in the Y and Z directions. If a total blockage is desired
then the %Area term is set to zero and Coef is set to a nonzero value.
N-Ax
The column number in the file Table.inp, which contains time dependent data for the
normalized area of the orifice. The actual area ratio of the orifice is ratio (next parameter
below) times the normalized time dependent area. A time-dependent orifice allows things
such as the opening and closing valves, doors, and windows to be simulated.
N-Cx
The column pointer to the time dependent loss coefficient in file Table.inp.
With the definitions in the *REGIONS section of the input file the user can define a grid and paste the
model parameters and other definitions into the grid to define the overall 3-D problem.
71
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
The codes Geomview or Paraview will allow the user the view the object and grid structure. Other
codes could be used as well as long as they can read vtk, off, or gmv formatted files. The model above
will create the object pictured below. The pool location is shown as the green solid disk below the
cylinder. When the code is executed, this cylinder would be removed from the model.
72
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Figure 4. A composite image created by the Geomview code showing the objects
and the mesh structure simultaneously.
The parameters for this section of the input file are defined below.
*object3d 'name'
This keyword tells the code that a 3-D object is to be defined. This control word is followed by
an ASCII string that defines the name of the object. The 3-D problem definition section is
terminated by an *end line. In the present version of C3D only a single 3-D object can be
defined.
73
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*mesh
This keyword turns on the automatic mesh generation algorithm. The coordinate system is
right handed.
In the example shown above, the number of mesh cells, and the size of the mesh is explicitly
defined. The reason is so that the geometry is matched exactly with the cell edge boundaries.
This is not a requirement, but it will increase accuracy when the objects are created.
Non-aligned cell edges will create cells with some porosity, and that can reduce the
computational accuracy of the flow. Increased accuracy is obtained when the cell edges are
aligned exactly with the geometry. Occasionally the user may define a mesh where the cells are
larger than the object. When this occurs the object may not appear at all, or seriously
malformed.
When running a multi-block problem the mesh created in each zone/block must match exactly
with the dimensions in the mesh input. The multizone domain statement (defined later) will
select which part of the mesh to use in that zone.
74
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
+xpwr (or –xpwr , +ypwr , -ypwr , +zpwr , -zpwr) start stop number
These optional parameters define a power law growth coordinate system. Three arguments
must appear, start position, end position, and number of cells. A power law growth increases
(or decreases) the cell size by a fixed multiplier. The multiplier is found by the segment length
(end position minus start position) and the number of cells. To use this option, a fixed cell size
must appear in one of the adjacent segments. A positive sign indicates that the cells will
advance from the start position to the end position. A negative sign indicates that the cells will
advance in the negative coordinate direction i.e. from the end value to the start value. The cells
may grow or shrink, depending upon segment length, start position, and number of cells.
When defining a mesh the user will use any combination of the 'xfix', 'xvar', '+xpwr', and
'-xpwr' commands similarly for the y and z axis. By using a suitable combination of the var, fix, and pwr
commands variable meshes can be created.
The mesh in all three X, Y, and Z directions must be created independently. When the code is run,
three files are printed out. They are Xgrid.out, Ygrid.out, and Zgrid.out. These files contain the cell
size, growth ratio and cell edge positions. They should be examined before any CFD calculation is
made to be sure a suitable grid has been created.
Occasionally the code will print out an error with negative grid sizes. This may occur when the user
tries to cram too many cells into a region and negative size cells are required to fill the domain due to
the constraints of continuity cell size between regions.
When running a multizone problem the full grid is printed in the *grid.out files. The section of grid that
corresponds to the zone specified by the domain statement is also indicated in these files.
Next, solid object primitives can be overlaid on top of previously defined regions. All subsequent
definitions replace existing ones if in the same physical location. Fluid regions can replace a
pre-existing solid regions in order to create holes.
An example of setting up a physical model based upon geometric location is shown below.
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
75
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
c
*geom type xmin xmax ymin ymax zmin zmax Gas Wall Pwr HT Turb Drag Orf
'domain' -20 20 0 10 -20 20 1 0 0 1 1 0 0
c esph axis x0 y0 z0 ymin ymax rady radxz
'open_esph' 'y' 10 5.11175 10 5.1175 5.4516 .3341 1.0145 1 2 0 1 1 0 0
c cyl axis x0 z0 ymin ymax rad
'open_cyl' 'y' 10 10 4.88315 5.11175 1.0145 1 2 0 1 1 0 0
'cyl' 'y' 10 10 .3365 4.88315 1.2446 1 2 0 1 1 0 0
'cyl' 'y' 10 10 .0 .3365 1.0145 1 2 0 1 1 0 0
c short cylinder to view pool location
'cyl' 'y' 10 10 .0 .1 3.5 1 3 0 1 1 0 0
c type xmin xmax ymin ymax zmin zmax Gas struc Pwr HT Turb Drag Orf
'Wall' -9 -4 1.1 1.1 -1.5 1.5 1 0 0 1 1 1 0 'thin wall'
c thin ring axis x0 z0 ymin ymax rad parameters
'RING' 'y' .6 0.0 9.15 11.7 .533 1 0 0 0 1 0 3
'windshield'
c Cone axis (focus)x0 y0 z0 x1 y1 z1 ymin ymax parameters
'Cone' 'y' 0.0 9.307 0.0 0.0 9.15 0.656 8.968 9.15 1 2 0 0 1 0
0 'cone-hat'
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
*Geom
This control card turns on the C3D solid modeler.
Type
This keyword defines the type of region. Currently there are 8 possible types which are be
chosen by an ASCII keyword. The 8 types are domain, box, cylinder, plane, plane_eqn,
sphere, equation, cone, enclosure, hole and wall. The Domain type can only appear once.
It is used to set the limits of the computational domain, objects that lie, or project beyond
the domain are cut at the domain boundary. The geometric types are as follows:
1. Box defines a 3-D rectangular brick like region.
2. Cylinder defines a smooth cylinder using the body fitted approximation.
3. Sphere defines a smooth spherical region.
4. Plane defines a smooth planar surface.
5. Equation defines a general 3-dimensional elliptic equation.
6. Cone defines a conical section.
7. Enclosure creates a thin wall box with impermeable orifices as the walls.
8. Wall creates a thin wall, i.e. thin plane aligned with the cell edges.
9. Hole will cut a hole in the enclosure or wall definitions.
All the objects defined above can only be aligned with one of the three principle axes,
except the spherical, and plane regions. Rotation of an object into an arbitrary orientation
is not available. More complex objects can be created by importing an STL file created by
a CAD application. The user can combine C3d solid model objects with STL objects. Each
geometric type requires different input as defined below.
There are also two cutting or clipping tools that can be applied to the geometric regions.
These tools will allow the user to build more complex objects by defining a geometric
76
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
shape then cutting and/or clipping it and then placing another object adjacent to it. The
clip tool trims existing solid structures beyond the clipping region and fills the surfaces of
the clip edge with body fitted surfaces. The cut tool removes everything inside the cut
region, (the opposite of the clip tool) and does not fill the ends with body fitted surfaces.
The C3d body fitted surfaces will allow heat, mass, and momentum transfer to 1-D
sub-grids. To use a cut or clip tool, a geometric region is first defined (such as a cylinder),
it can be followed by a cut or clip region or both. The cut or clip input line applies only to
the geometric object immediately preceding, not to all geometric objects. The arguments
to cut and clip are Xi, Xf, Yi, Yf, Zi, and Zf, which are the minimum and maximum extent
in x, y, and z directions.
There are also two additional options for the object types, open_* and stair_* where * is
an object type (for example open_cyl is an open cylinder, and stair_cyl is a stair stepped
cylinder). The open_* option does not fill in the body fitted surfaces at the ends of the
object. This option is used when building complex objects that consist of multiple
connected cylinders for example. The stair_* option follows the mesh cell boundaries and
results in a stair step object – that is the same as a conventional finite difference object
approximation. This option is useful in special circumstances where the intersection of
multiple body fitted objects could create undesired surfaces. Another use for the stair_
option is when code comparisons are being made to other finite difference codes that do
not have the body fitted approximation. And finally the stair option could be used when
the code is experiencing numerical difficulties with body fitted surfaces.
['Domain'] Xi Xf Yi Yf Zi Zf Model-Pointers
A box or rectangular region which requires 3 x, y and z pairs that define the minimum and
maximum extent in each of the 3 principal X, Y, and Z directions. This defines the
computational domain, other objects that are defined but extend outside the domain will be
clipped at the domain boundary. The domain must be the first region that is defined.
When solving a multi-zone problem the domain statement defines the zone of interest. All other
objects can be inside or outside the specified domain and the code will slice the objects at the
domain boundary. In this way the user need not build separate input files for each zone. The
same input file is used in each zone and the code will chop the objects to the correct size. The
only difference between the input files in each zone are the domain statements and the zone
boundary conditions that define other zones to communicate with.
'Box' Xi Xf Yi Yf Zi Zf Model-Pointers
A box or rectangular region which requires 3 x, y and z pairs that define the minimum and
maximum extent in each of the 3 principal X, Y, and Z-Axis directions. All smaller box regions
must reside within the principle domain.
'Enclosure' Xi Xf Yi Yf Zi Zf Model-Pointers
A rectangular enclosure with thin impermeable orifices as walls. This object requires 3 x, y and
77
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
z pairs that define the minimum and maximum extent in each of the 3 principal X, Y, and Z-
Axis directions.
'Wall' Xi Xf Yi Yf Zi Zf Model-Pointers
A single thin wall typically used with the enclosure objects. Wall is used to add additional walls
to the model or model a thin surface. Wall models act as thin impermeable orifices. This
object requires 3 x, y and z pairs that define the minimum and maximum extent in each of the 3
principal X, Y, and Z-Axis directions. At least one of the pairs must be identical, which defines
the plane location of the thin wall. Computationally, thin walls are located at the edges of the
cells, not the cell centers. Ideally the user would define the location to be exactly at the cell
edge. If it is not, then the code will shift it to the nearest cell edge.
'Hole' Xi Xf Yi Yf Zi Zf Model-Pointers
A single hole typically used only with an enclosure or thin wall objects. Hole is used to add
holes, windows, and doors to a thin wall or enclosure model. A hole requires 3 x, y and z pairs
of coordinates that define the minimum and maximum extent in each of the 3 principal X, Y,
and Z-Axis directions. At least one pair of coordinates must be identical, which defines the
location of the hole. Hole will not cut a hole in a thick wall object. For thick wall objects use
the 'box' command with the material being the working fluid instead of solid.
78
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
79
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
80
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Figure 7. A diagonal plane that has been cropped by a box. The object is easily
created by the 'plane' object command.
81
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
STL file
C type-stl dx dy dz scale fill model pointers…………………………………………… filename
'STLA' 0.0 1.9150 0.0 1 1 2 1 0 1 1 0 0 'package.STL'
Defining a complex object from a cad program is done by importing an ASCII (stla) or a
binary (stlb) *.stl file. The first three parameters are to shift the stl object in the x, y and z
directions respectively. The next, 4rth, parameter is a scale parameter to change the size of
the object. The scaling parameter is useful in changing units say from inches to meters.
The 5th ‘fill’ parameter tells the code to fill (1) or not-fill (0) void spaces inside the STL
object. Next the stl object model pointers and finally the name of the file. When viewing
STL objects with a 3-d viewer such as geomview or paraview the C3D coordinate system
mapped surface polygons are displayed. The original stl image may be opened and viewed
for comparison to see how well the coordinate system resolves the complex object.
Gas
The pointer to the gas definition
82
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
struc
The pointer to a structure definition
Pwr
The pointer to a power definition
Ht
The pointer to a heat transfer correlation
Drag
The pointer to a drag correlation
Orf
The pointer to an orifice definition
The code uses the painters algorithm in defining the properties of the cells, i.e. a geometric region of
nodes can be defined as having one set of properties and then overwritten later as having a different set
of properties. In this way, complicated geometry's can be defined with a minimum of input lines
provided that the user overlaps the regions in an appropriate manner. If smooth curved objects are
defined and these objects are allowed to intersect, then it is possible to create unwanted holes at the
intersection of the smooth curved surfaces and solid objects. Such holes must be filled by addition of
solid material.
The values of the pointers can be zero, except that at least one gas or structure pointer must be
non-zero. If the structure is curved or otherwise not aligned with the cell boundaries, then both gas and
structure pointers must be non-zero because the edges of the object will have both gas and solid in the
surface cells due to the body fitting technique. When the pointers are zero, that aspect of the code or
material property is turned off within the chosen cells. For example if the structure pointer is set to
zero, then that region will be filled with gas with the characteristics of the gas region pointer. If the
heat transfer or drag pointers are set to zero then there will be no convective heat transfer or drag.
Pointers can be overwritten so that they can be defined on one line and then turned off by a subsequent
line. This allows the user to create new regions with different properties within previously defined
regions.
83
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
equations. Certain boundary conditions are assigned to multiple equations simultaneously, such as the
flux boundary condition, which assigns both a normal momentum flux and a temperature. Such BC's
may overwrite previous definitions depending upon the sequence of BC's the user has assigned.
One possible problem when running CFD calculations is an imbalance in inflow and outflow. If the
total mass inlet flow does not balance the net mass outflow, problems may occur. If there is a net mass
outflow from the system the total fluid density will decrease, temperatures will drop and the solution
will eventually terminate with some type of problem, in this case very high velocities. The best way to
insure continuity of mass is to use the exit, vexit, and pressure (or hydro) type boundary conditions.
Both pressure and hydro allow flow into and out of the domain as needed to balance the pressure
within the domain.
In addition users must insure that the fluid zone is continuous, that is there are no trapped bubbles of
fluid within solids. Trapped fluid bubbles may result in slow convergence, and small time steps. The
code will not check if trapped bubbles exist, but they can be removed with the *FillVoids command.
*Boundaries Side Type start stop start stop Arg1 Arg2 Arg3......
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
*Boundaries Side Type start stop start stop Arg1 Arg2 Arg3
'all' 'flux' 0 0 0 0 0 300
'all' 'conc' 0 0 0 0 0 0 0.23 0 0 0
'xmin' 'flux' 0 10 0 20 1 300
'xmax' 'hydro' 0 10 0 20 300
'ymax' 'hydro' 0 20 0 20 300
c Radial pool xc yc rad tboil, Hfg, cp_fuel, Rate0 Time0 Max MinRate species
'rymin' 'evap' 10 10 3.5 450 3.00E+05 2200 0.072 2 0.25 0.01 1 0 0 0 0
'rymin' 'conc' 10 10 3.5 1 0 0 0 0
c
*end
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Boundaries
This keyword turns on the boundary condition loop. As many boundary conditions are entered
as the user wishes. The boundary condition loop is terminated by a *end statement
Side
A character string that must be surrounded by quotes. It refers to which side of the domain
over which to apply the boundary condition. The options are xmin, xmax, ymin, ymax, zmin,
zmax respectively. All six sides can be defined simultaneously with the ‘all’ option. Finally the
user can also define a circular region by prepending an r to the face, for example rxmax would
be a circular region on the xmax boundary.
Type
A character string surrounded by quotes which describes the type of boundary condition being
84
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
'block' (2 character string arguments – filenames – output and input, a multi-block BC)
This type of boundary condition is used to couple multi-block parallel CPU operations.
The user would set up separate computational domains adjacent to each other. The
separate domains are coupled at the local domain boundaries by the use of filenames.
The first argument is the local output filename and the second argument is the
path/filename to the adjacent domain. The current version or C3D can only couple to a
single adjacent domain on any single boundary face. Multiple adjacent domains on the
same boundary face are not yet allowed in this version of C3D.
'flux' (2 arguments)
A normal mass or momentum flux (i.e. kg/sec/m2) and temperature boundary
condition. Two parameters are input, a normal mass flux and a temperature. The code
will check if solid structure exists at the boundary and set the flow to zero for such
conditions. If such conditions are encountered it will also print out a warning message
in C3d.out file. If porous structure exists at the boundary then the mass flux applies in
the void space of the computational node. If porous structure exists in the node at a
boundary and the user wishes to specify a superficial mass flux at that boundary then
the number that must be entered is the desired value of superficial mass flux divided by
the void fraction of the computational cell. A negative value corresponds to flow in the
negative coordinate direction. This boundary condition is applied to both momentum
and energy equations.
'mass' (2 arguments)
An absolute mass flow rate in kg/sec. Two arguments are input, the total mass flow
rate, and the fluid temperature. This boundary conditions can be used in cases where
the total mass flow rate is known, but the user may not know the flow area due to
blockages etc. This boundary condition is applied to both momentum and energy
equations.
'press' (2 arguments)
A pressure boundary condition. The pressure is assigned in the center of the boundary
node, not at the boundary interface. Two arguments are input, Pressure and
temperature. This boundary condition is applied to both momentum and energy
equations.
'time' (2 arguments)
Read a table of values for the normal mass flux and temperature as a function of time
from the file Table.inp. Two arguments are input, the column number for the normal
mass flux, and the column number for the temperature. This boundary condition is
applied to both momentum and energy equations.
85
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
'vel' (2 arguments)
An explicit velocity boundary condition. It is explicit because the code uses the
beginning time step value of gas density in generating the momentum boundary
condition, and that value may slightly different than the end of time step density. Two
arguments are input, the fluid normal velocity and the fluid temperature. This
boundary condition is applied to both momentum and energy equations.
'table'
A normal mass flux boundary condition that has a specified shape as defined in the file
profile.inp
'Time_xyz' (3 arguments)
A 3-dimensional mass flux boundary condition that has a time varying value as
specified in Table.inp. This includes all 3 momentum components hence it is
particularly useful in applying time varying wind boundary conditions. Three
arguments are input, which are the column numbers for the x, y, and z components of
momentum. This boundary condition is only applied to the momentum equations.
'vgrad' (4 arguments)
A normal mass flux boundary condition that has a specified gradient as defined by the
86
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
addition of the 4 argument parameters. The gradient is defined by the sum of the
normalized values of the start-stop parameters in the two orthogonal directions. This
boundary condition applies only to the momentum equations.
'temp' (1 argument)
A temperature boundary condition. This boundary condition applied to the energy
equation only.
'hydro' (1 argument)
A hydrostatic pressure boundary condition. This boundary condition can be used in
place of the pressure boundary condition where gravity head is included in the pressure
term. The pressure at the coordinate system origin is Press0. A single argument is
required, the fluid temperature. This boundary condition is applied to both momentum
and energy equations.
'h' (1 argument)
A heat transfer coefficient boundary condition. This BC only applies to the energy
equation.
'Exit' or 'Vexit'
An exit mass flux boundary condition that is computed internally based upon a mass
balance over the entire domain. Exit is calculated once at problem startup. Vexit is
calculated at the beginning of each time step. If there are mass sources or other time
varying phenomena occurring in the problem, Vexit should be used to force total
conservation of mass within the domain.
'vcross' (2 arguments)
A cross flow momentum boundary condition in the two orthogonal directions. Two
arguments are required, the cross momentum components. The order of entry is X,Y,Z
– not including the normal component. For example if a Y boundary face is being
defined then X and Z components would be defined. If and X boundary, then input Y
and Z components. If a Z boundary is defined, the input X and Y components.
'wind' (3 arguments)
A wind boundary condition that does not vary in time. 3 Arguments are required which
are the X, Y, Z values of the momentum vector. This BC only applies to the
momentum equations.
'rigid'
A rigid velocity boundary condition. This BC only applies to the momentum
equations.
'free'
87
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Arg1, Arg2,................
Boundary condition physical values. Depending upon the boundary condition type these
numbers can take on different meanings. See the definitions above for the values and numbers
of arguments as function of BC type.
*end
This terminates the definition of the 3-D problem
The 1-D sub-grids comprise a set of one-dimensional mass, momentum, energy, and species
transport equations that can be coupled to, and transfer vector and scalar field variables to and
from the 3- dimensional mesh. In essence, they allow the user to refine the mesh locally for heat,
mass, momentum, and species transfer. The sub-grids can be assigned by the user, created
automatically, or both. They are not required for a CFD solution but greatly increase the
flexibility of the types of problems that can be solved. The first example below shows an
automatic definition of a 20 node 1-D sub-grid with adiabatic boundary conditions. The example
consists of a 2.54 cm steel shell with 4 cm insulation. The second example shows how to build a
88
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
1-d pipe that can be used to transport material anywhere in the 3-d grid in any orientation. The
‘pipe’ type of 1-d subgrid is unique in that it does not need to reside within the 3-d computational
domain. The ends of the pipe can exist either inside or outside the 3-d domain. However, if the
pipe is used to transport material into or out of the domain that end of the pipe must be inside the
3-d domain.
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*object1d 'cylinder' example of a solid 1-d
*1Dauto nxi nxf Gas Wall Pwr HT Turb Drag Orf Len
1 10 1 2 0 0 0 0 0 .0254 ‘Steel Shell’
11 20 1 3 0 0 0 0 0 .04 ‘Insulation’
*Boundaries Side Type Arg1 Arg2 Arg3
'xmin' 'flux' 0 0
'xmax' 'flux' 0 0
*end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*OBJECT1D 'PipeLine'
*1DPIPE 0.0 .225 1.5 pipe start coordinates x,y,z
c Start End Gas Struc Pwr H Turb Drag Orf x y z dia Name
1 1 2 0 0 0 0 1 0 -0.1 .225 1.5 .1 '2 x 1.5 inch pipe stub'
2 10 2 0 0 0 0 1 0 -0.7 .225 1.5 .1 '2 x 1.5 inch pipe'
*BOUNDARY
'xmin' 'PRES3D'
'xmax' 'PRES3D'
*END
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
When coupled to a 3-D surface a 1-D subgrid is a method of local mesh refinement without
refining the 3-D mesh. In a 3-D problem with surfaces that may be thin, or where heat transfer
needs to be resolved in greater detail, 1-D subgrids allow the user to resolve the fine scale
conduction within the solid associated with the surface. The 1-D subgrids are coupled to each
other laterally if they have the same number of computational cells. Therefore, the heat transfer
associated with 1-D subgrids is actually 3 dimensional and most accurate for conditions where the
surface represents a thin object relative to the breadth of the surface, for example, a wall.
This section of the report only defines how to construct the subgrid, not how to couple it to the 3-
d grid. It is a definition only and it is not used until the user activates it in the *coupling section of
the input file. Hence the user can define a large number of different types of 1-D subgrids and use
or not use any of them by simply commenting or uncommenting the activation lines in the
*coupling section.
[*Object1d]
This turns on the definition of 1-D sub-grids, which is a method of local mesh refinement. In a
3-D problem with surfaces that may be thin, or where heat transfer needs to be resolved in
greater detail, 1-D sub-grids allow the user to resolve the fine scale conduction within the solid
associated with the surface. The 1-D sub-grids are explicitly coupled to each other laterally if
the adjacent subgrids have the same grid structure. Since the lateral coupling is explicit time
89
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
step control may be required for subgrids that are as thick as the cells are wide. This explicit
coupling only applies to heat transfer in thick solid regions, other types of subgrids do not have
any limitations.
[*1duser]
This keyword turns on user defined 1-dimensional sub-grid models. When user defined 1-D
sub-grids are used, the total number of 1-D sub-grids is assigned by the user. The user may
wish to assign both user defined and automatic for some problems. User defined 1-D sub-grids
are useful for a variety of special purposes. For example, they can be used to simulate nozzles
to inject flow, with a specified velocity, and chemical species to simulate a burner, or fire
suppressant.
[*1dauto]
This keyword turns on automatic1-dimensional sub-grid models. In using the automatic 1-D
sub-grids, the number is assigned by C3D based upon 1-D coupling to surfaces in the 3-D
problem. C3D will assign a single 1-D sub-grid to each polygon surface within a 3-D cell.
nxi, nxf
These parameters control the number of 1-d cells in a layer. If the numbers are equal then only a single
cell is created for the subgrid. There can be multiple 1-d layers so that composite materials can be
modeled. The 1-dimensional distribution of materials and other modeling parameters set by the
pointers. The modeling parameters are used within the 1-d node range nxi to nxf. The node ranges of
multiple 1-d layers is controlled by the nxi and nxf parameters. The values of nxi and nxf must be
piecewise continuous as in the example shown. There is no limit to the number of cells in a 1-d subgrid.
Modeling parameter pointers; Gas, Wall, Pwr, HT, Turb, Drag, Orf
Pointers to the same materials and physical model parameters as in the 3-D models described
above.
Len
The physical length of the 1-d layer associated with the cells nxi to nxf.
Fluid flow between the 1-d subgrid and 3-d grid must be turned on with a 1-d boundary condition. For
a flux type BC, the coordinate direction matters. On the xmin boundary flow into the 3D domain must
be negative valued and positive for flow out of the 3-D domain. On the xmax boundary a positive value
90
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*Boundaries
Turns on the definition of 1-D boundary conditions.
Type
There are several types of boundary conditions (BC) that are allowed for 1-D sub-grids. A list
and definition of the different types appears below:
1 'Flux' A mass flux and temperature boundary condition. Two arguments
mass flux and temperature. A mass flux of zero creates a no-flow boundary
condition. A temperature of zero creates an adiabatic boundary condition. Note
that an adiabatic boundary condition does not turn off thermal coupling to the 3d
domain. If flow in the 1-d subgrid is desired, the 1-d momentum solver must be
activated in the ‘*Equations’ section of the input file. Also keep in mind that flow
direction is important, positive flow is from left to right (Xmin to Xmax) and
negative flow is from right to left (Xmax to Xmin). If the left (Xmin) boundary is
coupled to the fluid, the mass flow must be negative for fluid injection to occur.
2 'Temp' Single argument, the boundary temperature
3 'H' Two arguments, heat transfer coefficient and boundary temperature.
4 'Conc' A species mass fraction, Nspecies arguments, one value for each
species in problem.
5 'Pres0' A pressure boundary condition, single argument, the pressure.
6 'Pres3d' A pressure BC, where the pressure is local pressure in the 3-D grid.
Only a single Pres3D BC can be used on given 1-d sub-grid. No arguments are
required.
7 Struc3d A heat transfer boundary condition to the underlying structure (solid
material) in the 3-d domain. Use of this BC will allow 3-d heat transfer within 3-d
structure after the heat has passed through the 1-d sub-grid layers. Only a single
Struc3D BC can be used on any given 1d sub-grid. No argument is required.
8 'Time' A time varying mass flux/temperature (ie. ‘flux’) BC. Two arguments
required, are the data column numbers from the file Table.inp
9 'Hydro' A hydrostatic pressure boundary condition, the pressure is found from
the hydrostatic head associated with the coupling location. This BC does not
couple flow to the 3-d Subgrid. Use Pres3D for coupling both pressure and flow.
10 'Evap' Fluid variable evaporation/boiling BC. The fluid will evaporate based
upon a heat balance at the fluid-gas boundary. The 1-d sub-grid can receive heat
from the 3-D domain, and it can conduct heat into the interior of the 1-d sub-grid,
which may suppress or enhance the rate of evaporation. 7 +Nspecies arguments are
required. The arguments are 1- Tboil (fluid boiling temperature). 2- Hfg – Latent
heat of evaporation. 3- Cpevap Specific heat of evaporating gas. 4- Evap0 – initial
91
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
evaporation rate (kg/m2/sec). 5- Time0 Time (sec) over with to maintain Evap0. 6-
Evap-Max Maximum allowed evaporation rate (kg/m2/sec). 7. Evap-Min Minimum
allowed evaporation rate (kg/m2/sec). plus Nspecies mass fractions of evaporate.
This boundary condition should not be used with 1-d sub-grid flow turned on.
11 'hrad' A radiation plus convective cooling boundary condition. It has three
arguments, the convection coefficient, a surface emissivity, and environment
temperature.
Side
There are two sides for the 1-d sub-grid boundaries, Xmin and Xmax
Arg1, Arg2,...
These are the arguments for the boundary conditions, which depend upon the type of BC as
described above. The number and value of arguments follow the same rules as for 3-D
boundary conditions.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*OBJECT1D 'PipeLine'
*1DPIPE 0.0 .225 1.5 pipe start coordinates x,y,z
c Start End Gas Struc Pwr H Turb Drag Orf x y z dia Name
1 1 2 0 0 0 0 1 0 -0.1 .225 1.5 .1 '2 x 1.5 inch pipe stub'
2 10 2 0 0 0 0 1 0 -0.7 .225 1.5 .1 '2 x 1.5 inch pipe'
*BOUNDARY
'xmin' 'PRES3D'
'xmax' 'PRES3D'
*END
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
The 2nd type of 1-d subgrid in the example is a pipeline. This example has only 2 legs but there is no
limit on the number of legs.
*1DPIPE
This tells the code a pipeline is being defined. 3 Coordinate locations are specified on the same
line which are the x,y,z start coordinates of the pipeline.
The next line contains the same set as defined above in example 1 for a typical 1-d subgrid. Those
arguments are followed on the same line by 5 additional arguments. The first 3 are the end coordinates
of the pipe leg, followed by pipe diameter, followed by a name for the pipe leg. The next line would
contain data for the next leg of the pipeline. Additional legs can be added as desired until the
*Boundary line is entered. Then boundary conditions for the start and end of the pipeline are entered
next. The boundary conditions for pipelines are usually flow and energy type, with the same definitions
as in the previous section. Some boundary conditions may be invalid and cause an error.
When using pres3d boundary conditions at the end of a pipeline an unwanted flow may occur due to
the existence of an unwanted pressure gradient. The pressure gradient may exist if the end of the pipe is
not aligned with the cell center of the 3-D cell. The code will find the correct cell location for the end of
the pipeline, however it will use the pressure in the 3-d cell which is only defined at the center of the 3-
d cell. A misalignment in position can create a small hydrostatic head which will create some flow.
92
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Coupling of the 1-D sub-grids to the 3-D domain allows the user to model heat, mass, momentum, and
species exchange on a highly refined one-dimensional mesh. This section describes how to assign the
coupling between different parts of the 3-D model and the 1-D sub-grids.
In the previous section 1-d subgrids were defined but not used. This section of the report shows how
to use those subgrids.
Heat, mass, momentum and species coupling to the 1-D sub-grids occurs explicitly at the
beginning of the time step. Stability issues are not normally encountered however it is possible to
exceed stability limitations for cases that are tightly coupled. C3D tries to set a stable time step
based upon explicitly calculated heat transfer parameters. However if it fails, the user must
control any instabilities by direct time step control - usually using a maximum time step size less
than the unstable one will solve any stability issues that cannot be controlled by the internal time
step algorithm.
Several examples are included in this section because of numerous options for coupling the meshes and
each option requires slightly different format. Below each example, a definition of the various
parameters is included. Parameters that have been previously defined will not be repeated.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c--------------User Defined Coupling between 3-D and 1-D subgrids --------
*Coupling 'user'
C # Type Filename 1-D Model
1 ‘FILE’ ‘Nozzle.inp’ ‘Flare’
C Type 1-d model
2 ‘Pipe’ ‘Pipename’
c cmd type 1d-model delx dely delz xstart xstop ystart ystop zstart zstop
3 'ARRAY' 'PIPE' 'PipeHX' 0.254 0.0 0.38 0.092 0.350 0.630 4.9 -2.519 2.600
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Coupling ‘user’
This keyword turns on the 3-D to 1-D coupling section of the code. There are two
possible types, user-defined and automatic. If both types are activated, the user-defined
coupling must be assigned first.
#
A counter for the user defined coupling model. There can be an unlimited number of
coupling models. This counter is used for reporting errors.
93
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Type
The type of user defined transfer between the 3-D and 1-D sub-grids. There are three
choices; ‘file’ ‘Pipe’ and 'Array’. File tells the code to open a file (2nd argument) and read
the data for a group of line sources of heat, mass, and momentum. Point sources are
created by setting the line source length to a small value. The line sources are used for
injection or withdrawing material and/or heat to or from the 3-D grid, such as from a
nozzle in a flare. (If this type of user coupling is desired, be sure to activate the 1-d
momentum equation and use a Pres3d boundary condition on the 1-d subgrid that
simulates the nozzle.) ‘Pipe’ and ‘Array’ are used in defining 1 dimensional pipes and/or
arrays of pipes such as in a heat exchanger.
‘filename’
Name of the file which contains the line source data. The file has the following format:
First line has two arguments, the number of sources, npoints, and character string ‘line’
Next, read npoints lines for the following data – all 8 entries are on the same line
1. the 3-D x,y,z line source location
2. the direction cosines of the line source
3. the flow area of the line source
4. length of line source
1-d Model
Name of 1-D sub-grid that models the group of line sources.
‘Array’ type, 1d model, dx, dy, dz, xmin, xmax ymin ymax zmin zmax
Array specifies an array of pipes (the only option for now) that are set up
according to the data supplied in the 1-d model definition. This command is very
useful if the user wants to define a large number of pipes such as found in a heat
exchanger. The next 3 arguments dx, dy, dz, are the shift positions for the next
pipe. The first pipe origin is located at coordinates xmin, ymin,zmin and the array
fills the box defined by xmin, xmax, ymin, ymax, zmin, zmax.
In the example below, there are 2 automatically coupled models. The first model couples a solid
orifice structure (which simulates a thin wall, or ceiling) to a group of 1-D sub-grids that will
calculate the heat and mass transfer associated with a burning wall. The second model, couples a
solid object, to another group of 1-D sub-grids for calculating heat transfer within the solid
object.
94
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Coupling 'auto'
C coupling by material type
c # 1-d name search 3d-object-type xi xf yi yf zi zf
1 ‘wall’ 'box' 'orf-2’ 1 30 1 21 1 30
2 ‘cylinder’ 'box' 'struc-1’ 1 30 1 21 1 30
c thin wall coupling by 3d-object name
c # 1-d name search 3d-object-name xi xf yi yf zi zf
3 ‘Flat-Car’ 'box' 'flat_car' -20 20 0 9.25 -3.1 3.1
C coupling to a complex STL file object
4 ‘steelwall’ 'box' 'STL-car.stl' -20 20 0 9.25 -3.1 3.1
*end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
Automatic coupling is activated by the keyword 'auto' on the *coupling command line, as in the
example above. The format for automatic coupling is described below
#
The first parameter is the numbering of automatic coupling zones. The numbering is used
when reporting errors. There may be several objects, or surfaces that have different
characteristics. Each automatic coupling group can be assigned their own 1-D sub-grid
group, with a unique set of properties and dimensions.
1-d Name
This is the name (case sensitive) of the 1-D sub-grid model.
search
This defines a geometric search zone, which currently is limited to a 3-d rectangular box
and y cylindrical zone. 'Box' and ‘CYL’ are the only options. ‘Box’ requires 6 arguments,
which are the Xmin, Xmax, Ymin Ymax, Zmin, Zmax positions of the search box. If the
min and max of any pair (X,Y, or Z) are both entered as 0, then the domain max and min
are used. Thus one could search the entire domain simply by entering 6 zero’s. If ‘CYL’
is used then 6 arguments are still entered. The first argument is the cylinder axis
represented by a number 1, 2, or 3 which are X, Y, Z axis respectively. The next two
arguments are the cylinder center locations of the orthogonal axes. The next 2 arguments
are the min and max values of the cylinder along the cylinder axes. The last 6th argument
is the radius of the cylinder search zone.
3d-obj-type
This word associates either a structure type, a thin wall object, or an STL file defined
object. There are 3 options:
1. If struc-# is chosen, the structure pointer associated with the number # will be
connected to the 1-D sub-grids. For example, 'struc-4' will couple the 1-d
object (1-d Name) to all 3-D objects constructed of material 4 that are found
within the search box. By choosing a structure pointer, the user can construct
an object with different structural materials, and each material can be
95
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
xi, xf, yi, yf, zi, zf (or axis(1,2,3), center1, center2, cylmin, cylmax, radius)
These are the geometric limits of the 3-d rectangular search box. Entering all zeros tells
the code to search the entire computational domain. If a cylindrical search zone is entered
the first argument is the cylinder axis represented by a number 1, 2, or 3 which are X, Y, Z
axis respectively. The next 2 arguments are the min and max values of the cylinder along
the cylinder axes. The last 6th argument is the radius of the cylinder search zone.
An important point regarding the structural materials that are searched for is what material
properties to use when constructing the 3-D object. If the object is ‘standalone’ that is 1-
d subgrids will not couple to that object, then the user would use the real materials that the
object is actually constructed from. However if the 3-D object is coupled to 1-D subgrids
then the heat transfer simulation has been shifted to the 1-D subgrid, and is to be ignored
internally within the 3-D object. For that reason adiabatic materials should be used in
constructing the 3-D object and those adiabatic materials (their associated integer
pointers) would be searched for in the search box. Adiabatic materials, those with thermal
conductivity=0, should be created in the *structure part of the input file along with real
materials. So the rule to follow is quite simple, if you are going to model the heat transfer
within a 3-D object with 1-d subgrids, build the 3d object with adiabatic materials, and
build the corresponding 1-d subgrids with real materials.
The last section of the input file allows the user to control the types and amount of output that the
code generates. There are several options for type of output. Each output type can be plotted by
different graphics packages. In the examples that follow, an example and description of each type
of output follows
96
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*VISIT delay dt xi xf yi yf zi zf
0 .1 0 35 0 27 0 32
*PLOT3D delay dt xi xf yi yf zi zf
.0 .05 0 60 0 25 0 60
*Ascii pdelay dtplot ngroup
0.0 .5 2
'first group' 2 x y z
39.45 0 30
40.1 1 30
'2nd group' 2
49.45 0 30
50.1 1 30
*volhis (time frequency output is set by as *ascii line above)
C xmin xmax ymin ymax zmin zmax name
1 0.0000 0.74200 0.0000 0.90000 0.0000 1.1000 'HollowGbox’
*FLUX2D
0.000 2.5000E-02 3 'Y' 0.7570 0.7760 0.000 1.210 0.4100 'GapFlowHistory'
'Y' 0.8776 1.000 0.000 1.330 0.4100 'FrontPlateFlowHis'
'Y' 0.7570 1.000 0.000 1.330 0.4100 'Total Flow'
*Ascii_1du delay dtplot ndat i j
0.0 .1 3 3 8
1 6
1 10
*Ascii_1d pdelay dtplot ngroup
0.0 .1 1
‘Calorimeter’ 2 X Y Z 1d-Cell
37. 0.6 30 10
17.7 0.7 8.8 3
*1DU delay dtdist # start nstop 1dU
0.0 .2 3 1 10 1
1 10 12
1 10 15
*1D delay dtdist # x y z start stop
0.0 1 4 39.45 .61 30 1 20 ‘Distrib1’
39.45 1.83 30 1 20 ‘Distrib2’
39.45 3.00 30 1 20 ‘Cable'
39.45 4.00 30 1 20 ‘Ground’
*Binary-1D # delay dtdist # start nstop I2 I3 dir
0 .1 2 2 6 26 15 'y'
2 6 26 16 'y'
*Binary-2D # delay dt
4 0.0 .5
#Binary 2D filename axis start stop start stop plane Species-filename
'pl2dz.bin' 'z' 0 30 0 30 15 ‘Spz.bin’
'pl2dy.bin' 'y' 0 30 0 30 0 ‘spy1.bin’
'pl2dy2.bin' 'y' 0 30 0 30 3 ‘spy2.bin’
'pl2dx.bin' 'x' 0 30 0 30 15 ‘none’
*end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Output
A keyword that turns on output control
97
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
conduction.
Facearea.off is a color coded off type file for viewing with Geomview. It gives the user
a graphical 3-D display of the cellular surface areas for heat and mass transfer of the
1-D auto assigned sub-grids.
Areaxi.off, Areayi.off, Areazi.off are color coded *.off type files for viewing with
Geomview. They give a 3-D graphical display of the flow areas in x, y and z directions
respectively.
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*VTK ‘binary’ delay dt xi xf yi yf zi zf nstart
0 .1 1 35 1 27 1 32 -1
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
98
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Delay
Delay time before which field output is produced.
dt
The time step between field output files
[nstart]
This is an optional start number of the first file. The field output files are numerically
sequenced so the user can create a movie. The last file number generated is stored in the
restart file, so the user can continue the sequence if desired. If the value of nstart is zero or
positive, that number will be used in the first vtk file that is produced. If the number is negative
one, then the first file will be named PV000.vtk if the calculation is started from scratch, or it
will continue the current sequence if the run is from a restart.
99
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
This option is used when the user wants to plot out isosurfaces of constant radiation flux. The
first argument is the minimum value of viewfactor allowed for flux calculations. If a radiating
surface has a viewfactor less than the minimum it is ignored. A typical value is 1e-6, and 0.0 is a
valid argument.
The next 6 arguments control the do loop parameters of the cells in the X, Y, and Z directions.
Radiation problems with large numbers of surfaces and large numbers of cells, such a multipoint
ground flares with hundreds of flares and millions of computational cells, may require hundreds of
hours of CPU time to complete all of the raytracing required. By reducing the number of cells to
calculate the raytracing computations may be completed in a few hours instead. The do loop
parameters are the start, end, and step node number parameters in the X (1, 100, 5, in example),
Y, and Z directions respectivly. This type of radiation output is normaly run from a restart and
only for a single time step. The output file is called irad.vtk and it can be viewed with ParaView.
This option is used when the user wants to plot out radiation heat flux history plots at selected
locations. This option is useful since it does not require the user to set up 1-d subgrids to monitor
radiation. The first argument is the number of radiation monitor locations, 2 in the example above.
This is followed by that number of lines containing the x, y and z location of the radiation
monitors. Radiation surface orientation is is defined by the next 3 arguments. The radiation
monitors are not required to be inside the computational domain, they can exist outside, and this
can be a useful method of combining radiation fluxes from parallel multi-block problems. If the
selected location is inside a solid material, a warning is printed because the radaition flux output
will be zero for that location.
100
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*Ascii
A keyword that turns on ASCII formatted output for computational cell output.
delay
The delay time before which ASCII output data is printed to various output files.
dtplot
This is the amount of time between writes to the output files
ngroup
The number of groups of data
groupname
The name of the group
Ndat
Number of locations (x,y,z data sets) for this group.
x,y,z...
The x, y, and z locations of ASCII output. The x,y,z locations must have ndat entries. Each
must be on a separate line.
The rate of data output is set with the *ASCII output request. If *ACSII is not used, there will be no
volume history output. The first parameter is the number of volume histories. The next 6 parameters
are the x, y, z coordinates of the rectangular volume for which to produce output. The last parameter is
the name of the volume history.
The 3 coordinate pairs and names are repeated for any additional volume history requests.
101
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
mean pressure, and species flow across a user defined rectangular plane. Such data is useful for
monitoring the flow through a doorway for example. The format for this type of output is shown
in the example below
*FLUX2D
c delay Dt num axis Xmin Xmax Zmin Zmax Yloc
0.000 2.5E-02 3 'Y' 0.7570 0.7760 0.000 1.210 0.4100 'GapFlowHistory'
'Y' 0.8776 1.000 0.000 1.330 0.4100 'FrontPlateFlowHis'
'Y' 0.7570 1.000 0.000 1.330 0.4100 'Total Flow'
*Ascii_1du
A keyword to turn on ASCII output of field variables in 1-D user sub-grids. The code will
output: temperature, mass flow rate, and integrated species flow rate at selected 1-D user
assigned computational cells.
delay
The delay time before which ASCII output data is printed to various output files.
dtplot
This is the amount of time between writes to the output files
ndat
The number of locations that the user wishes to have output ASCII output data for.
i,j...
The cell number and sub-grid number producing ASCII output. The i,j data pairs must have
ndat entries
102
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*Ascii_1d
A keyword that turns on ASCII formatted output for a 1d sub-grid that has been automatically
assigned.
delay
The delay time before which ASCII output data is printed to various output files.
dtplot
This is the amount of time between writes to the output files
Ngroup
The number of data groups
Group name
The name of this particular group. The name is used in Xplot output selection
ndat
The number of locations that the user wishes to have output ASCII output data for.
x,y,z,cell...
The 3-D x, y, z location(s) of the coupled 1-d sub-grid. Followed by the ith computational cell
of the 1-d sub-grid. The x,y,z,cell data sets must have ndat entries for each group.
103
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Binary-1D # delay dtdist # start nstop I2 I3 dir
0 .1 3 4 21.4 4.7 6.8 'x'
0 15.6 8.8 8.4 'y'
0 11.0 6.5 4.5 'z'
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Binary-1d
A keyword to turn on output for 1-D field distributions anywhere in the 3-D mesh. The
distributions must lie in one of the principle (X, Y, or Z) axes directions. Diagonal distributions
are not allowed.
delay
The delay time before output is written
dtdist
The time between outputs
start
The start position location
stop
The stop position location
I2, I3
The perpendicular axis positions of the distribution. Which perpendicular axis depends upon
the next parameter, the axis direction. If X is chosen, enter the Y and Z locations. If Y is
chosen, enter the X and Z location. If Z is chosen, enter the X and Y locations.
Dir
An single ASCII character 'X', 'Y', or 'Z' which is the axis direction in which to write the
distribution.
104
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
[*1DU], [*1DU_ASCII]
*1DU is a keyword that turns on output from 1-dimensional user defined sub-grids.
*1DU turns on binary output for XPlot
*1DU_ASCII turns on the same output except in ASCII format.
Delay
the delay time between outputs
dtdist
the time step between outputs
#
The number of 1-D distributions
start, stop
the begin and end node numbers for the distribution
n1d
the nth 1-D user sub-grid distribution to plot.
[*1D], [*1D_ASCII]
*1DU is a keyword that turns on field variable distribution from 1-dimensional automatic
defined sub-grids. *1D turns on binary output for XPlot. *1D_ASCII turns on the same
output except in ASCII format.
Delay
the delay time between outputs
dtdist
105
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
#
The number of 1-D distributions
x,y,z
The 3-D x,y,z cell locations associated with the 1-D automatic sub-grid for which to plot a
distribution.
Start, Stop
The beginning and ending node numbers of the distribution to plot.
3.9.13 Animated 2-D Contour Plots within the 3-D Model, Slices and Projections
The user can request animated contour plot output of field variables along any slice parallel to one
of the 3 principle axis. Or, a contour plot of a maximum, or minimum projection within a volume.
An example of such an output request follows.
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Binary-2D Num delay dt
4 0.0 .5
#Binary-2D filename axis start stop start stop location
'pl2dz.bin' 'z' 1 35 1 30 16 'sp2dz.bin'
'pl2dzp.bin' 'zp' 1 35 1 30 9 24 'sp2dzp.bin'
'pl2dx.bin' 'x' 1 30 1 32 17 ‘none’
'pl2dxp.bin' 'xp' 1 30 1 32 1 35 ‘none’
*end
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*Binary 2D
A keyword to turn on 2-dimensional binary contour plot output for XPlot.
Num
The number of contour plot lines to read
Delay
the delay time before which output is produced
dt
The time step between outputs
filename
The name of the for which to generate 2-d output.
Axis
The perpendicular axis to the contour surface over which the output will be produced. Which
axis is chosen determines what the next entries are. There are 9 possible choices; x,y,z are
106
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
contour slices across the x y of z axes. xp, yp, or zp are contour projections over a positional
range. The contour projection contains the maximum value at any location along a line of sight.
xpm, ypm and zpm are contour minimum value projections. xa, ya, za are field variable time
averages over the selected dt, this option is useful if the problem fluctuates and the user is
interested in an average value.
[filename-2]
An optional file name, which if present, will contain species data at the same contour slice.
There may be other input files that C3D reads for supplemental information.
Time dependent data is read from a file called Table.inp. The format for Table.inp is simple. On
the first line enter the total number of columns (N) to read. The second line begins the data. The
first column (i.e. column 0) contains the time in seconds. This is followed by N-1 data columns
(columns 1...ndat in C3d.inp). The data columns can represent anything the user has defined in
the C3d.inp file. The C3d.inp file directs the code which data column to read for the required
data. The code will linearly interpolate between lines in the file as the calculation proceeds.
107
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
If the user is modeling a group of flares then the best way to inject fuel is to define a set of line
sources. Within C3d.inp in the *COUPLING user defined section, the nozzle file name would be
defined. In this example the file name will be called nozzle.inp and an example is shown below.
In this example the code expects to read 19200 lines of data, only the first 4 lines are shown here.
The data are as follows
X,Y,Z first 3 data are the X, Y and Z starting positions of the line source - meters
108
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
C3d_stop
This file will terminate the problem at the next screen output. Normal
termination may include writing a restart file.
C3d_kill
This fill will kill the problem at the next screen output without writing a restart
file. This is a useful option if the user wants to preserve the data in the restart
file.
Restart
This file will trigger the writing of a restart file at the next screen output. The
file is called restart.inp, and any existing restart.inp file will be overwritten.
GMV or VTK
This file will trigger the writing of the next gmv or vtk file. The user must have
selected the GMV or VTK option for output because the code needs certain
parameters in order to write the file.
TEC
This file will trigger the writing of the next tec file. The user must have
selected the TEC option for output because it needs certain parameters in order
to write the file.
If the file is a request for a Geomview file (*.off) and the file is empty, then the code will write the file
using its own internal scaling. If the file contains a max and a min value, then the code will scale the
output (color-coded) by the values contained in the file. The following files will create Geomview files
with the data defined below.
StrucTemp
This file will trigger the writing of a StrucTemp.off file for viewing with
Geomview. The file is color coded and internally scaled by the maximum and
109
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
minimum values of the auto assigned 1-D sub-grids. This file displays the
surface temperature of the coupled object. This file can be re-scaled by user
assigned values if the file contains a maximum and minimum value.
Aerosol
This file will trigger the writing of an Aerosol.off file for viewing with
Geomview. The file is color coded and internally scaled by the maximum and
minimum values of the auto assigned 1-D sub-grids. This file displays the
deposited density of aerosol on the coupled object. This file can be re-scaled by
user assigned values if the file contains a maximum and minimum value.
Speed
This file will trigger the writing of a Speed.off file for viewing with Geomview.
The file is color coded and internally scaled by the maximum and minimum
values of the surface of auto assigned 1-D sub-grids. This file displays the gas
speed on the surface of the coupled object. This file can be re-scaled by user
assigned values if the file contains a maximum and minimum value.
Tgas
This file will trigger the writing of a Tgas.off file for viewing with Geomview.
The file is color coded and internally scaled by the maximum and minimum
values on the surface of the auto assigned 1-D sub-grids. This file displays the
gas temperature on the surface of the coupled object. This file can be re-scaled
by user assigned values if the file contains a maximum and minimum value.
110
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
The ASCII files are of three types, a run time history of the calculation, simple time history data files
suitable for any spread sheet plotting package and specially formatted graphics files for use with XPlot,
Geomview, GMV, and Paraview. When C3D runs, it will automatically set up limit files that can be
read by Xplot. Xplot uses limits files (*.lim) to determine how to plot and label the data. Within each
limit file are commands which tell Xplot which columns to plot, the plot titles, etc.
111
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
The file StrucTemp.off is a plot of the surface temperature of all solid objects in the model. The
temperature is color coded and the scale varies between the minimum and maximum in the model. The
values of the minimum and maximum temperatures are printed out in the C3d.out file.
The file Tgas.off is a plot of the gas surface temperature of all coupled solid objects in the model. The
temperature is color coded and the scale varies between the minimum and maximum in the model. The
values of the minimum and maximum temperatures are printed out in the C3d.out file.
The file Aerosol.off is a plot of the deposited aerosol density of all coupled solid objects in the model.
The density is color coded and the scale varies between the minimum and maximum in the model. The
values of the minimum and maximum temperatures are printed out in the C3d.out file.
The file Speed.off is a plot of the fluid speed on the surface of all coupled solid objects in the model.
The speed is color-coded and the scale varies between the minimum and maximum in the model. The
values of the minimum and maximum temperatures are printed out in the C3d.out file.
112
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
There are two types of binary data files that can be produced by C3D, 1-D and 2-D. Both types are
binary and can only be read by the XPlot viewer. They are intended to display a time-animated
sequence of the users choice.
The binary 1-D files will show one-dimensional distributions intersecting the 3-D grid at any location
along any principle axis direction. If sub-grid models are activated one-dimensional distributions of
temperature, species concentration, velocity and other field variables can be viewed in the subgrid as
well.
The binary 2-D data files will display time animated 2-d contour slices or projections along any
pre-selected cut plane.
113
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Solution
First be sure that your environment variables are set up that the c3d executable can be
found. The default location is in /usr/local/bin on a Linux system. When unpacking the
code be sure it is executable, if not use the command chmod +x /usr/local/bin/c3d. c3d is
normally supplied as a statically linked file so there should not be any missing library files.
If the code will not run at all, the problem is caused by a bad, or missing, input file.
Normally the code will print a message indicating the problem. If the code doesn’t print a
message, it probably couldn’t read the input file. In this case, examine the output that was
printed, if it failed reading the input, the problem lies somewhere near or at the line that
was printed last. The output normally is printed on the screen, if that option is not
available, open file C3d.out in the directory where the code was executed.
If the code printed an error message it will indicate the type of error. Some Common Errors at
Startup are:
This is caused by assigning a 1-d subgrid to some material or geometry in the main 3-d
grid and the code failed to find that geometry or material within the specified search
box. A common problem is miss-assignment of material number, or a poorly defined
search box. Make sure that the search box includes the object that is being searched
for.
Another possible problem may be that the grid was too coarse to build the object, so it
doesn’t exist. This could be diagnosed by viewing the C3d.vtk file with Paraview or
C3d.off file with Geomview.
This occurs when the names of 1-d objects is not consistent. Check spelling and
114
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
This type of error is caused whenever the user is reading a restart, but changes the
input file in such a way that the number of computational cells change, the number
of 1-d subgrids changes, a new solid appears where a fluid used to be, or vice
versa. Typically these problems occur when the user changes the geometry, or
mesh, and tries to read a restart. The solution is to re-run the problem from
scratch.
Undefined Temperature
The code initializes the entire memory with an undefined temperature. After
defining the mesh and geometry, if an undefined temperature is encountered this
means that the mesh size and geometry are not consistent. The user may have
defined a mesh that exceeds the computational domain size, or vice versa. Check
the boundaries of your mesh and geometry (primarily domain size).
Another possibility is that you have defined geometry and have not assigned a fluid
to that geometry. If the geometry has curved surfaces (sphere, cylinder, etc.)
computational cells on the boundaries must contain both solid and fluid. If no fluid
is assigned, undefined temperature errors will occur. Check the solid and fluid
parameters for all your geometric primitives.
Occasionally this error occurs because the code was unable to read some earlier
part of the input file correctly but did get past that section without flagging an
error.
This error occurs when you have assigned a boundary condition that extends
beyond the computational domain boundaries. Check the limits of your BC’s and
compare to the domain size.
When viewing your model - Geometry is defined but object is not there, or very
distorted. This can happen if you have created geometry and have not assigned a solid
material to it. Check your geometry material parameters. Another possibility is that
you do not have enough grid cells to resolve the object. This can make the object
disappear altogether or appear very distorted. In this case increase the mesh resolution
(all 3 directions) in the vicinity of the object.
115
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Once the user has resolved all of the possible input problems and the code is running, it is still
possible to have run-time problems. If the code runs and stops unexpectedly, without an error
message, check file C3d.out for errors.
Occasionally the code may have a run time error, such as divide by zero, which is captured by the
operating system. Check material properties, especially variable properties, to determine if
properties have become negative or zero. Normally this type of run time error is difficult to
diagnose and should be reported to the code author (ajsuoan@comcast.net), along with any
debugger trace back information and the input file that caused the problem.
The most common run time problems fall into 2 main categories: 1- negative temperature, and 2-
slow running.
Negative temperature
If this occurs, the computation has become unstable, and terminated due to negative
temperatures. The code will attempt to recover by using small time steps but if this fails
the run will be aborted.
If running a restart, the code has read an incompatible restart file and is attempting to
execute it.
The input file may have bad thermophysical properties. If negative thermal conductivity,
or zero (or negative) specific heat, is used in a computation, negative temperatures can
result. Check thermophysical properties of all your materials, negative properties are not
allowed. Zeros are allowed, except for molecular weight, pressure, density, and specific
heat. If using variable properties, determine if they can become negative during the
computation.
Another possible cause is that the model has geometry or run-time parameters that
ultimately cause a numerical instability. This type of problem can be diagnosed by
examining the run time behavior, it the code runs with successively shorter time steps and
larger errors, then it is unstable and some parameters must be changed to enhance
stability.
If the code runs but continues to go unstable and recovers, examine the
time step size history (use xplot - select global history – select time step
size). Then pick a maximum time step that is less that the size where the
116
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Increase number of momentum iterations, if the code will not stabilize with
50 iterations this generally will not help
Change the mesh or geometry slightly. A very small cell flow area or
volume can sometimes cause instability. A slight change in the mesh may
remove small flow areas and the possible problem. Another problem is
isolated fluid bubbles inside solid structure, or completely cut off regions,
i.e. a wall that splits the computational domain in two. Some of these
problems might be diagnosed by viewing the model and mesh with
Geomview. Another option may be to use stair step geometry instead of
smooth geometry. Smooth geometry can create cells with very small void
fraction adjacent to cells with large void fraction. This combination can
result in numerical instabilities.
Check the values in the input file, make sure there are suitable values for all
your input. Bad or non-physical values of some parameters can cause
problems.
Check your boundary conditions to be sure that there is not a net mass
outflow from the system. Typically such a condition would be accompanied
by mean background pressure that approaches zero. Check the system
pressure to diagnose this problem.
Slow Running
If the problem runs slowly, i.e. a fraction of a millisecond time step, there could be several
possible causes.
Possible causes:
117
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
adding drag. This is especially true during problem startup when large pressure
waves may be forced through the system due to the sudden onset of flow. After
the problem is running smoothly, the max time step size can be increased.
EOS (Equation of state) error control. This is generally the most common
problem. It can be diagnosed by checking the run time screen print which may say
EOS error. If this is the problem, check to see if the cell location causing the
problem is fixed or if it varies. Cell location (i,j,k = x,y,z cell number) is printed out
next to the time step error data. If the location is fixed on an object surface, create
a Geomview surface plot of flow speed, and EOS error. Check if the locations are
co-located and if they are the same as the time step control location. Here are
some possible solutions:
o Modify the geometry and/or mesh slightly. Occasionally, the mesh structure
combined with the C3D body fitted methods leads to a condition that is
numerically unstable, or barely stable usually because a cell with a tiny flow
volume is adjacent to a cell with a much larger flow volume. Try adding or
subtracting a single computational cell in the unstable region. Sometimes
using a stair step geometry rather than smooth geometry will solve the
problem.
o Make sure there are no isolated sections of the domain, or voids in solids.
The fluid must be a continuous medium. Isolated voids within the domain
or inside solid are not allowed. For example a thin wall enclosure (i.e. a
thin wall box) without an opening (door, window) is not allowed, since the
interior would be isolated from the exterior.
o Make sure the mesh has smooth transitions in all 3 (X, Y, Z) directions.
The growth ratio between adjacent cells can, but preferably should not
exceed 1.3
Courant Number control (Istep=3). Ideally this would be the time step constraint
in a well running problem with normally expected flow velocities. However if the
118
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
time step is very small this is caused by having too high speed flow indicative of an
instability. Possible causes are:
119
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
7 Example Problem
The input file example shown in previous sections contained too many options for an example
C3D problem. In this section the input file for a working problem will be presented. The example
problem will contain many aspects that would be encountered in a real fire simulation. The user
can copy and paste this file into a text editor and modify it to suit their needs. The example
chosen is an enclosure pool fire – the SNL Flame Facility, with a cylindrical calorimeter in the fire.
Fixed evaporation and the use of subgrids for heat transfer are used. This example is chosen
because it is complex enough for a real world problem and can be easily modified. For example, if
an outdoor fire is desired, simply delete the enclosure and its openings, redefine the domain size,
fires size, and re-mesh.
120
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*EQUATIONS
*MOMENTUM upwind crosswind Iter EOS-Error SOR Grav-X Grav-Y Grav-Z
'PRESSURE' 0.0 .2 50 1.0E-04 1.2 0.0 -9.8 0.0
*ENERGY upwind iter SOR
'2EQN' .3 15 1.2
*SPECIES Name upwind iter SOR Mole-Wt 3d 1d Hf(KJ/gmole)Entropy(KJ/gmoleK)
9 'c12h26' 1.0 15 1.20 170 'ON' 'OFF' -350 490 'g'
'c2h2' 1.0 15 1.20 26. 'ON' 'OFF' 226 200 'g'
'h2' 1.0 15 1.20 2. 'ON' 'OFF' 0 131 'g'
'o2' 1.0 15 1.20 32. 'ON' 'OFF' 0 205 'g'
'c20' 0.5 15 1.20 240. 'ON' 'OFF' 0 5.7 's'
'h2o' 0.5 15 1.20 18. 'ON' 'OFF' -242 188 'g'
'co2' 0.5 15 1.20 44. 'ON' 'OFF' -394 213 'g'
'co' 1.0 15 1.20 28. 'ON' 'OFF' -110. 197 'g'
'ch4' 0.5 15 1.20 16. 'ON' 'OFF' -74.8 186 'g'
c PC-Mass-Frac Emiss Tinf ViewFactor NVapors Fuel Oxidant Soot PC
*media 0.06 1. 300 'ON' 7 'c12h26' 'o2' 'c20' 'co2'
c Species Correlation Scale-Factor
'c12h26' 'C2H2' 1
'c20' 'SOOT' 1
'co2' 'CO2' 1
'h2o' 'H2O' 1
'c2h2' 'C2H2' 1.
'co' 'CO' 1.
'ch4' 'CH4' 1.
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*CHEMISTRY N-Reac/Prod Coef Name Coef Name
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c dodecane breakdown
11 'XGlobal' 2 1 'c12h26' 1 3.6 'o2' 1
3 7.2 'h2o' 5.8 'c2h2' .02 'c20'
1 000 1 300 2
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c dodecane reforming
'XGlobal' 2 1 'c12h26' 1 2 'h2o' 1
4 3 'c2h2' 2 'co' 12. 'h2' .1 'c20'
.5e7 15000 0 1300 0
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc Hydrogen burn to h2o
'xglobal' 2 1 'h2' .33 .5 'o2' 1
1 1 'h2o'
1e8 10000 1 400 0
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c 3 Acetylene burn to CO+h2+soot nucleation
'XGlobal' 2 1 'c2h2' .33 .85 'o2' 1
3 1.7 'co' 1 'h2' .015 'c20'
2e8 15110 1 300 2
cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c4 cc Acetylene+soot=moresoot+h2 (soot growth)
'XGlobal' 2 1 'c2h2' 1 .01 'c20' .33
2 1 'h2' .11 'c20'
1e7 15110 0 300. 0
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c5 cccc CO Burn to CO2
'XGlobal' 3 1. 'co' 1 0.5 'o2' .25 1 'h2o' .5
2 1 'co2' 1.0 'h2o'
1E+18 20142 1 100 0
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c6 Soot + h2o to CO
'XGlobal' 2 1. 'c20' .33 20 'h2o' 1
2 20 'co' 20 'h2'
.6 0 0 1300 .75
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c6 ccccccc Soot Burn to CO
'XGlobal' 2 1. 'c20' .33 10 'o2' 1
1 20 'co'
.36 0 1 1300 .75
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c7 cccc 2C2H2 + 3H2 ==> 2CH4 nreac coef name exp
'XGlobal' 2 1 'c2h2' 1 3 'h2' 1
1 2 'ch4'
121
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
122
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
123
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
*OBJECT1D 'Pool1'
*1DAUTO Start End Gas Struc Pwr H Turb Drag Orf Length Name
1 10 1 2 0 0 0 0 0 0.10000 'pool'
*BOUNDARY Temp Hfg Cp xm0 time0 xmx xmn mass frac
'Xmin' 'EVAP' 450. 3.0E+05 2200 2.2E-02 2.0E+06 0.25 2.E-03 1 0 0 0 0 0 0 0 0
'Xmax' 'FLUX' 0.00 0.0000
*END
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*OBJECT1D 'Pool2'
*1DAUTO Start End Gas Struc Pwr H Turb Drag Orf Length Name
1 10 1 9 0 0 0 0 0 0.10000 'pool'
*BOUNDARY
*BOUNDARY Temp Hfg Cp xm0 time0 xmx xmn mass frac
'Xmin' 'EVAP' 450. 3.0E+05 2200 2.5E-02 2.0E+06 0.25 2.E-03 1 0 0 0 0 0 0 0 0
'Xmax' 'FLUX' 0.00 0.0000
*END
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*OBJECT1D 'Pool3'
*1DAUTO Start End Gas Struc Pwr H Turb Drag Orf Length Name
1 10 1 10 0 0 0 0 0 0.10000 'pool'
*BOUNDARY Temp Hfg Cp xm0 time0 xmx xmn mass frac
'Xmin' 'EVAP' 450. 3.0E+05 2200 3.7E-02 2.0E+06 0.25 2.E-03 1 0 0 0 0 0 0 0 0
'Xmax' 'FLUX' 0.00 0.0000
*END
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*object1d 'Calorim'
*1Dauto nxi nxf Gas Wall Pwr HT Turb Drag Orf Len
1 5 1 11 0 0 0 0 0 .003 'ss304'
6 10 1 14 0 0 0 0 0 .05 'DuraBlanket'
*Boundaries Side Type Arg1 Arg2 Arg3
'Xmax' 'flux' 0 0
'Xmin' 'hrad' .01 .7 400 Emission thru flames
*end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*COUPLING 'AUTO'
c 1-d name search couple-to
1 'Pool1' 'BOX' 'STRUC-3' -2.0 2.00 2.780 3.0 -2.00 2.0000
2 'Pool2' 'BOX' 'STRUC-7' -2.0 2.00 2.780 3.0 -2.00 2.0000
3 'Pool3' 'BOX' 'STRUC-8' -2.0 2.00 2.780 3.0 -2.00 2.0000
4 'WallHFG' 'BOX' 'ORF-1' -3.0 3.05 0.000 7.0 -3.05 3.0500
5 'WallHFG' 'BOX' 'ORF-1' -3.0 3.05 0.000 7.0 -3.05 3.0500
6 'PoolHFG' 'BOX' 'ORF-1' -3.0 3.05 0.000 7.0 -3.05 3.0500
7 'PoolHFG' 'BOX' 'ORF-1' -3.05 3.05 0.000 7.0 -3.05 3.0500
8 'Calorim' 'BOX' 'struc-12' -2 2 2.78 6 -2 2
*END
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*OUTPUT
*GRID
*ASCII Start-Time dt ngroup
0.0000 1.00000E-03 1
'Pool_0.1m' 5 x y z
0.10000 3.0400 0.0000
0.10000 3.2900 0.0000
0.10000 4.2900 0.0000
0.10000 4.7900 0.0000
0.10000 6.7900 0.0000
*ASCII_1D Start-Time dt N-Groups
0.0000 1.00000E-03 4
'WallHFG' 4 x y z 1d-cell
-2.7500 2.8500 0.0000 5
-2.7500 3.8500 0.0000 5
-2.7500 4.8500 0.0000 5
-2.7500 5.8500 0.0000 5
'PoolHFG' 4 x y z 1d-cell
1.0150 2.8500 0.0000 1
1.0150 3.8500 0.0000 1
1.0150 4.8500 0.0000 1
1.0150 5.8500 0.0000 1
'CalorimCen' 4
.00 3.57 0 1 top
-.16 3.41 0 1 side
124
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
125
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Figures 10 shows an oblique view of the model with chamber walls removed. The pedestal with
fuel pool is shown in the middle of the structure. The pool fire is depicted as a transparent
isosurface of the 0.4PPM soot volume fraction colored by local temperature. Inside the fire is the
cylindrical calorimeter.
These images were created by the Paraview code (on Linux systems). On Windows PC's
Paraview is also available and can be installed for free.
Figure 10. An oblique view of the example problem. Shown are the enclosure,
calorimeter, fuel pool, and pool fire. The fire is depicted as a 0.4PPM
soot volume fraction isosurface colored by local temperature.
This model predicts the heatup of the fully engulfed calorimeter and has been found to agree with
the measured experimental data. More details of this problem can be obtained from C3d
Combustion Model Validation report
126
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
8 References
Anderson, Tannehill, Pletcher, Computational Fluid Mechanics and Heat Transfer, McGraw
Hill, 1984.
Bird, R.B., W.E. Stewart and E.N. Lightfoot, Transport Phenomena, Wiley New York (1960).
Choi, M.Y., G.W. Mulholland, A. Hamins, T. Kashwagi. Comparisons of the Soot Volume
Fraction using Gravimetric and Light Extinction Techniques. Combustion and Flame
V102, pp 161-169, 1995.
L.A. Gritzo, J.A. Moya, and Douglas Murray, “Fire characterization and object thermal response
for a large flat plate adjacent to a large JP4 fuel fire,” Sandia National Laboratories Report
SAND97-0047, p. 22, January 1997.
Gritzo, L.A., Y.R. Sivathaunu, and W. Gill, “Transient Measurements of Radiative Properties,
Soot Volume Fraction, and Soot Temperature in a Large Pool Fire,” Combustion Science
and Technology, Vol. 139, pp. 113-136, 1998.
Hamis A., Fischer, J., Kashiwag, T., Klassen, M.E, and Gore, J.P, “Heat Feedback to the Fuel
Surface in Pool Fires,” Combustion Science and Technology, Vol. 97, No 1-3, pp. 36-62,
1994
Hirt, C.W., Sicilian J.M., “A Porosity Technique for the Definition of Obstacles in Rectangular
Cell Meshes,” 4th International Conference on Ship Hydrodynamics Washington, DC,
September 1985.
Issa, R.I. (1985) “Solution of the Implicitly Discretized Fluid Flow Equations by Operator Splitting,” J.
Comput. Phys, 62: 40-65.
Magnussen, B.F. Hjertager, B.H. On Mathematical Modeling of Turbulent Combustion with Special
Emphasis on Soot Formation and Combustion. 16th International Symposium on Combustion,
The Combustion Institute, Pittsburg Pa. PP 719-729, 1976
127
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
Murphy, J.J., C.R. Shaddix. Soot Properties and Species Measurements in a Two-Meter
Diameter JP-8 Pool Fire. SAND2003-8246. July, 2003
Patankar S. V., D. B. Spalding, A Calculation Procedure for Heat, Mass, and Momentum
Transfer in Three Dimensional Parabolic Flows. Int. Journal Heat and Mass Transfer. vol.
15, pp. 1787±1806, 1972
Pomraning, E. and Rutland, C.J, 2002, “A Dynamic One-Equation Non-Viscosity LES Model,”
AIAA Journal, Vol. 40, No. 4, pg. 689-701.
Siegel R, J.R. Howell. Thermal Radiation Heat Transfer, 2nd Edition. McGraw-Hill Book
Company, 1981
Smagorinsky, J., “General Circulation Experiments with the Primitive Equations,” Monthly
Weather Review, Vol. 91, pp. 99-165, 1963.
Said, R., Garo, A., and Borghi, R., “Soot Formation Modeling for Turbulent Flames,”
Combustion and Flame,” Vol. 108, pp. 71-86, 1997.
Society Fire Protection Engineers, Fire Protection Engineering, 2nd Edition, National Fire
Protection Association Publication, June 1995
Suo-Anttila, A., F2D Users Manual: A Two-Dimensional Compressible Gas Flow Code, Sandia
National Laboratories Report, SAND92-7343, June 1993
Suo-Anttila, A. J., Koski, J.A., Gritzo, L.A., “: CAFE A Computer Tool for Accurate Simulation
of the Regulatory Pool Fire Environment for Type B Packages,” SAND99-0625C, March
1999.
Suo-Anttila J. M., and L. A. Gritzo, “Thermal Measurements from a Series of Tests with a Large
Cylindrical Calorimeter on the Leeward Edge of a JP-8 Pool Fire in Cross flow,” Sandia
National Laboratories Report, SAND2001-1986, June 2001.
128
C3D Theory and Code Input Manual Computational Engineering Analysis
Revision 3
January 2019
129