CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Fire and smoke modeling (https://www.cfd-online.com/Forums/cfx/123381-fire-smoke-modeling.html)

CFDST September 11, 2013 10:28

Fire and smoke modeling
 
Hello Everybody,

I'm modeling a fire located in a room and I want to see the interaction between the ventilation system and the spreading of the fire and smoke. My model is simple a room with 2 inlets and 2 outlets and a fire source located into the middle of the room. I have checked into the Ansys support for this problem and found two text files. I have choose to make the combustion fire model, but when I start to enter the source code into CFX I stucked at the begining when I try to add the Boundary Floor I cannot add the Equation source CH4.mf. Does anybody has idea how to made this source code to the model.

http://www.2shared.com/photo/IBM8DfSw/Model.html - the model

http://www.2shared.com/document/_ccX...ombustion.html - combustion source code

http://www.2shared.com/document/IwgOC9ww/Inert.html - inert source code

Thank you.

CFDST September 11, 2013 10:29

Inert Fire Modelling
--------------------


#
# Fire Source
#


For inert fire simulations a source of heat is added to a source volume. This type of simplification is appropriate if accurate predictions of the shape of the flame and the near field region of the fire are not important.


The FireEfficiency parameter determines how much of the fire power is added as heat. It can be used to account for the combustion efficiency. In well ventilated fires with clean burning fuels this is likely to be quite high (0.9-1.0).


Radiation should always be modelled. Radiative heat fluxes from the fire zone can be significant. The total fire power will be split between the radiative and convective heat fluxes from the fire zone. If radiation is not being modelled then the efficiency needs to be reduced to account for the fact that all the power is dissipated by convective/diffusive heat fluxes only.


It is important to use a sensible size for the fire volume which will produce sensible temperatures. A useful strategy is to use CEL to set up a source region so that the size of the source can be easily changed, which allows for rapid testing of different sizes without having to generate a new mesh each time. This strategy becomes essential for modelling fires (or any source regions) that grow in time and is described in ANSYS solution number 541877. The mesh needs to be sufficiently fine in the fire region to accommodate any likely changes in size. It is then a simple matter to change the fire size and restart the calculation until an acceptable fire temperature is obtained. Once a suitable size has been obtained the mesh can be modified if desired.


The example below is for a fire in which the heat source is added to a cylindrical volume. The minVolume and minRadius parameters are used to constrain the minimum source volume to be similar to the smallest mesh volume.


#
# CCL Example
#
LIBRARY:
CEL:
EXPRESSIONS:
xFire = 5 [m]
yFire = 2.5 [m]
zFire = 0 [m]
FireRadius = max(0.25 [m], minRadius)
FireHeight = FireRadius
FireEfficiency = 0.9
FirePower = 0.5 [MW] * FireEfficiency
rSource = sqrt((x-xFire)^2 + (y-yFire)^2)
hSource = z-zFire
insideSource = step((FireRadius-rSource)/unitL)*step((FireHeight-hSource)/unitL)
SourceVolume = volumeInt(SourceFlag)@Fire Subdomain
heatSource = insideSource*FirePower/max(SourceVolume, minVolume)
minVolume = minVal(Volume of Finite Volumes)@Fire Subdomain
minRadius = (minVolume/pi)^(1/3)
unitL = 1 [m]
END
END
ADDITIONAL VARIABLE: SourceFlag
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Variable Type = Unspecified
END
END


FLOW: Flow Analysis 1
.
DOMAIN: Default Domain
.
FLUID MODELS:
ADDITIONAL VARIABLE: SourceFlag
Additional Variable Value = insideSource
Option = Algebraic Equation
END
END
.
SUBDOMAIN: Subdomain 1
SOURCES:
EQUATION SOURCE: energy
Option = Source
Source = heatSource
END
END
END
.
END
.
END


Cylindrical source volumes tend to produce flame heights that are quite a bit higher than the source height. A conical source region will produce a flame height closer to the height of the source region, eg:


LIBRARY:
CEL:
EXPRESSIONS:
BaseRadius = max(0.25 [m], minRadius)
FireHeight = 2*BaseRadius
FireRadius = BaseRadius*(1-hSource/FireHeight)
END
END
END


#
# Soot modelling
#


Soot is modelled as an additional variable having a specified volumetric source in the fire region. The soot yield is specified as a fraction of the fuel mass source. Values for soot yields for various fuel types are available in the literature and are dependent on how cleanly the fuel burns.


#
# CCL Example
#
LIBRARY:
CEL:
EXPRESSIONS:
sootYield = 0.05
FuelHeat = 15 [MJ kg^-1]
FuelMassSource = FirePower/FuelHeat
massSource = insideSource*FuelMassSource/max(SourceVolume, minVolume)
sootSource = sootYield * massSource
END
END
ADDITIONAL VARIABLE: soot
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Variable Type = Specific
END
END


FLOW: Flow Analysis 1
.
DOMAIN: Default Domain
.
FLUID MODELS:
ADDITIONAL VARIABLE: soot
Kinematic Diffusivity = 1.0E-5 [m^2 s^-1]
Option = Transport Equation
END
END
.
SUBDOMAIN: Subdomain 1
SOURCES:
EQUATION SOURCE: soot
Option = Source
Source = sootSource
END
END
END
.
END
.
END


The radiation field can be coupled to the gas temperatures via the soot mass fraction by setting the fluid absorption coefficient equal to:
GasAbs = 0.01 [m^-1] + max(1.5*density*soot/(smokeDensity*smokeDiameter), 0.0 [m^-1]).
smokeDensity = 2000 [kg m^-3]
smokeDiameter = 1.0E-6 [m]


The smoke diameter is the effective mean diameter of smoke particles and is essentially a free parameter that determines the degree of coupling between the gas and the radiation field. The formula above is derived from the emission from black, non-interacting spheres at the same temperature as the gas they are immersed in.




#
# Visibility
#


Visibility can be calculated on a local basis using the light-reflecting visibility for an infinite homogenous medium having a given local soot concentration [ref = DiNenno P.J., Handbook of Fire Protection Engineering, NFPA, Quincy, MA, USA, 1990.]


#
# CCL Example
#
LIBRARY:
CEL:
EXPRESSIONS:
c1 = 3.95E-4 [kg m^-2]
visibility = min((c1/max(soot*density, 1e-10[kg m^-3])), 1e3 [m])
END
END
ADDITIONAL VARIABLE: Visibility
Option = Definition
Tensor Type = SCALAR
Units = [m]
Variable Type = Unspecified
END
END


FLOW: Flow Analysis 1
.
DOMAIN: Default Domain
.
FLUID MODELS:
ADDITIONAL VARIABLE: Visibility
Additional Variable Value = visibility
Option = Algebraic Equation
END
END
.
END
.
END


#
# Time stepping
#


Buoyant flows can be difficult for the steady state solver to converge. It is often beneficial to use the transient solver even for a steady state solution. Time steps of around 1s may be possible for an inert fire model. The steady state solver can be run initially with auto time stepping. The time steps reported by the auto time stepping can by used as a guide for setting a transient time step.




#
# Transient fires
#
The power output of a transient fire tends to be described by a quadratic growth phase (P = a t^2) up to some constant maximum power (Pmax) achieved at some time (tg) which is the fire growth time. The size of the quadratic coefficient (a) determines the rate of fire growth.


National Fire Protection Association (NFPA) standardized fire growth curves:
Fire growth rate a (W/s^2)
Slow 2.9
Medium 12
Fast 47.


The fire size for the maximum power can be determined using the procedure above for a steady state fire. The power of a real fire tends to grow proportional to the cross sectional (floor) area of the fire. However, the constant of proportionality is different for differing fuels, and environmental conditions (wind, outdoor/indoor, ventilation, confinement, etc) hence the need to determine a size which gives a sensible temperature as described above. Also, real fires are typically fuelled by evaporation from a surface area, whereas the inert model described here distributes the fire power over a volume. To be consistent with the source modelling, the fire power should be set to be proportional to the source volume:
FireRadius = max((FirePower/MaxPower)^(1/3) * MaxRadius, minRadius)


If the fire power was to be set to be proportional to the area, the power density would be inversely proportional to the radius and grow as the radius shrinks, leading to spurious higher flame temperatures at smaller radii and the danger of extremely high power densities and temperatures at the start of the simulation (the power density would tend to infinity as the radius tends to zero).


The inert fire approximation is not expected to produce accurate solutions for the flame shape or the near field region, so the particular growth law for the radius is not important. What matters is maintaining sensible flame temperatures. If more accuracy than this is required you should use a combustion model.

CFDST September 11, 2013 10:30

Part of ANSYS solution 2002933 - How do I simulate fires in CFX?

Combustion Fire Modelling
-------------------------

#
# Fire Source
#

For combusting fire simulations a mass source of fuel is typically added over some area at a boundary such as a floor.

The FireEfficiency parameter determines how much of the fire power is converted in to a fuel source. It can be used to account for the combustion efficiency. In well ventilated fires with clean burning fuels this is likely to be quite high (0.9-1.0).

Radiation should always be modelled. Radiative heat fluxes from the fire zone can be significant. The total fire power will be split between the radiative and convective heat fluxes from the fire zone. If radiation is not being modelled then the efficiency needs to be reduced to account for the fact that all the power is dissipated by convective/diffusive heat fluxes only.

When specifying a power, the fire size needs to be set such that it produces an appropriate fire temperature. A useful strategy is to use CEL to set up a source region so that the size of the source can be easily changed. This strategy becomes essential for modelling fires (or any source regions) that grow in time and is described in ANSYS solution number 541877. The mesh needs to be sufficiently fine in the fire region to accommodate any likely changes in size.

For a combusting calculation the solver reports the enthalpy per mol [J/mol] of reaction at reference conditions. The heat released by a kilogram of fuel can be obtained by dividing the molar enthalpy of the reaction by the molecular weight of the fuel.

The example below is for a fire in which the fuel source is added over a circular area. The minRadius and minArea parameters are used to constrain the minimum source area to be similar to the smallest mesh area.

#
# CCL Example
#
LIBRARY:
CEL:
EXPRESSIONS:
xFire = 5 [m]
yFire = 2.5 [m]
zFire = 0 [m]
FireRadius = max(0.25 [m], minRadius)
FireEfficiency = 0.9
FirePower = 0.5 [MW] * FireEfficiency
rSource = sqrt((x-xFire)^2 + (y-yFire)^2)
insideSource = step((FireRadius-rSource)/unitL)
SourceArea = areaInt(SourceFlag)@Floor
FuelHeat = 8.0235E+05 *1000 [J/kmol] /16.04 [kg/kmol]
FuelMassSource = FirePower/FuelHeat
massSource = insideSource * FuelMassSource/max(SourceArea, minArea)
minRadius = (minVal(Volume of Finite Volumes)@Domain /pi)^(1/3)
minArea = pi*minRadius^2
unitL = 1 [m]
END
END
ADDITIONAL VARIABLE: SourceFlag
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Variable Type = Unspecified
END
END

FLOW: Flow Analysis 1
.
DOMAIN: Default Domain
.
FLUID MODELS:
ADDITIONAL VARIABLE: SourceFlag
Additional Variable Value = insideSource
Option = Algebraic Equation
END
END
.
BOUNDARY: Floor

BOUNDARY SOURCE:
SOURCES:
EQUATION SOURCE: CH4.mf
Flux = massSource
Option = Flux
END
EQUATION SOURCE: soot
Flux = sootSource
Option = Flux
END
END
END
END
.
END
.
END

#
# Soot modelling
#

Soot is modelled as an additional variable having a specified mass source over the fire source area. The soot yield is specified as a fraction of the fuel mass source. Values for soot yields for various fuel types are available in the literature and are dependent on how cleanly the fuel burns.

#
# CCL Example
#
LIBRARY:
CEL:
EXPRESSIONS:
sootYield = 0.05
sootSource = sootYield * massSource
END
END
ADDITIONAL VARIABLE: soot
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Variable Type = Specific
END
END

FLOW: Flow Analysis 1
.
DOMAIN: Default Domain
.
FLUID MODELS:
ADDITIONAL VARIABLE: soot
Kinematic Diffusivity = 1.0E-5 [m^2 s^-1]
Option = Transport Equation
END
END
.
BOUNDARY: Floor

BOUNDARY SOURCE:
SOURCES:
EQUATION SOURCE: CH4.mf
Flux = massSource
Option = Flux
END
EQUATION SOURCE: soot
Flux = sootSource
Option = Flux
END
END
END
END
.
END
.
END

The radiation field can be coupled to the gas temperatures via the soot mass fraction by setting the fluid absorption coefficient equal to:
GasAbs = 0.01 [m^-1] + max(1.5*density*soot/(smokeDensity*smokeDiameter), 0.0 [m^-1]).
smokeDensity = 2000 [kg m^-3]
smokeDiameter = 1.0E-6 [m]

The smoke diameter is the effective mean diameter of smoke particles and is essentially a free parameter that determines the degree of coupling between the gas and the radiation field. The formula above is derived from the emission from black, non-interacting spheres at the same temperature as the gas they are immersed in.


#
# Visibility
#

Visibility can be calculated on a local basis using the light-reflecting visibility for an infinite homogenous medium having a given local soot concentration [ref = DiNenno P.J., Handbook of Fire Protection Engineering, NFPA, Quincy, MA, USA, 1990.]

#
# CCL Example
#
LIBRARY:
CEL:
EXPRESSIONS:
c1 = 3.95E-4 [kg m^-2]
visibility = min((c1/max(soot*density, 1e-10[kg m^-3])), 1e3 [m])
END
END
ADDITIONAL VARIABLE: Visibility
Option = Definition
Tensor Type = SCALAR
Units = [m]
Variable Type = Unspecified
END
END

FLOW: Flow Analysis 1
.
DOMAIN: Default Domain
.
FLUID MODELS:
ADDITIONAL VARIABLE: Visibility
Additional Variable Value = visibility
Option = Algebraic Equation
END
END
.
END
.
END

#
# Time stepping
#

Buoyant flows can be difficult for the steady state solver to converge. It is often beneficial to use the transient solver even for a steady state solution. Time steps of around 0.3s are typical for a combusting model. The steady state solver can be run initially with auto time stepping. The time steps reported by the auto time stepping can by used as a guide for setting a transient time step.


#
# Transient fires
#
The power output of a transient fire tends to be described by a quadratic growth phase (P = a t^2) up to some constant maximum power (Pmax) achieved at some time (tg) which is the fire growth time. The size of the quadratic coefficient (a) determines the rate of fire growth.

National Fire Protection Association (NFPA) standardized fire growth curves:
Fire growth rate a (W/s^2)
Slow 2.9
Medium 12
Fast 47.

The fire size for the maximum power can be determined using the procedure above for a steady state fire. The fire power tends to grow proportional to the cross sectional (floor) area of the fire. However, the constant of proportionality is different for differing fuels and environmental conditions (wind, outdoor/indoor, ventilation, confinement, etc) hence the need to determine a radius at maximum power (maxRadius) which gives a sensible temperature as described above. The radius at lower powers is then described by
FireRadius = max((FirePower/MaxPower)^(1/2) * MaxRadius, minRadius)


#
# Alternative fire source specifications
#

If both the area and fuel injection/evaporation rate are known, the area can be explicitly meshed and the fuel source explicitly specified.
FuelMassSource = <constant> [kg m^-2]

It is also possible to construct more dynamic boundary conditions. For example, for liquid fuels, the area could be fixed (for example representing a tray of liquid fuel) and the fuel evaporation rate can be computed by evaluating the incident radiative heat flux over the surface of the fuel. The dynamic nature of this type of boundary condition would mean that the solver has to work harder to obtain a solution.

ghorrocks September 11, 2013 18:38

Can you get the inert model working? That would seem to be the obvious first step.

CFDST September 12, 2013 06:12

Quote:

Originally Posted by ghorrocks (Post 451229)
Can you get the inert model working? That would seem to be the obvious first step.

Hello,

Thank you for the reply. To get the inert model working is my main problem. I'm new to Ansys and CFX and the only thing I found about fire and smoke distribution is this. I have made the model into Gambit and the idea is to set the fire in the middle of the room and see the interaction between the inlets,outlets and the distribution of the smoke. I have set the boundry contidiotns- Inlet, Outlet, Walls, the middle small rectangle on the floor is set like wall again. The volume is set to Fluid . All the faces are Meshed with diferent step than the volume, the volume is Meshed arround 60 000 cells. I have tried to run the inert simulation in CFX. I begin with adding the expressions by copy paste the source code from the .doc dokument, this works. But when I continue with the next step


FLOW: Flow Analysis 1
.
DOMAIN: Default Domain
.
FLUID MODELS:
ADDITIONAL VARIABLE: SourceFlag
Additional Variable Value = insideSource
Option = Algebraic Equation
END
END


I go to the Insert-> New Domain and after that set the things like into the source code, but I DONT KNOW 1. THE LOCATION ? 2.THE ADDITIONAL VARIABLE VALUE is not working, there is the red message (bad expression value)

After That I start to create the SUBDOMAIN like that by right clicking->insert subdomain
and set the things like in the source code


SUBDOMAIN: Subdomain 1
SOURCES:
EQUATION SOURCE: energy
Option = Source
Source = heatSource
END
END

but Again there is 1. No Equation SOURCE Energy, onlyContinuity, Turbulence Kinetic Energy and Turbulence Eddy Disipation.

I have made some Print Screens. And I will be very pleased If you could help me.

1.May be I have to create a small volume Inside the big volume in the middle of the room and to say that this is the Domain and the Inside Source or ?
2. May be the fire is for a cylindrical volume ?

CFDST September 12, 2013 06:13

I'm upploading them right now

CFDST September 12, 2013 06:17

The Domain Problem
http://www.2shared.com/photo/ycrQjJN...n-Problem.html

http://www.2shared.com/photo/rtt2TJQ...Problem-2.html

http://www.2shared.com/photo/CsBNTXM...s_Problem.html

http://www.2shared.com/photo/utfYnCP...Problem_2.html

http://www.2shared.com/photo/zN_0Yk6R/Source_Code.html

http://www.2shared.com/photo/DCpdWUD...bdomain_1.html

http://www.2shared.com/photo/im78SjC...-Location.html

ghorrocks September 12, 2013 06:47

Both of your questions are dealt with in the CFX tutorials

For additional variables there are a few tutorials which use additional variables. Have a look at them for how they are implemented.

For the source - yes, this approach requires a volume, you are trying to attribute it to a boundary surface. Of course you could make the boundary face the fire but you would have to recast the model in terms of a bounary surface rather than a volume to get the convective/radiative heat transfer balance right. That is if you care about the convective/radiative heat balance.

CFDST September 16, 2013 10:57

Hello when I set all the boundary conditions to the simulation there was a error message :

Bad expression value 'sootSource' detected in parameter 'Flux' in object '/FLOW:Steady State Analysis/DOMAIN:Domain/BOUNDARY:Boundary 1/BOUNDARY SOURCE/SOURCES/EQUATION SOURCE:soot'.
CEL error:
The following unrecognised name was referenced: Floor.


Does anybody what this means ?


And there is another problem :

In this source code what does CH4.mf means


BOUNDARY: Floor


BOUNDARY SOURCE:
SOURCES:
EQUATION SOURCE: CH4.mf
Flux = massSource
Option = Flux

Thank you.

ghorrocks September 16, 2013 18:05

The error message means exactly what it says - you have referenced a object called "Floor" but no appropriate object exists. You need to change the name you are referencing or fix your mesh to have the correct names for regions.

CH4.mf looks like the CH4 mass fraction to me. Remember this is bounded by 0 and 1, so make sure your source term does not try to push it beyond those limits.

CFDST September 17, 2013 06:30

Thank you for the reply. I'm start to dealing with it right now.

And I have a question:

insideSource = step((FireRadius-rSource)/unitL) - why there is a step function in this inside source and what does it mean ?



SourceArea = areaInt(SourceFlag)@Floor - in this source code what does @Floor mean ?


Thank you.

ghorrocks September 17, 2013 07:10

Look in the CFX reference manual for the definition of CEL expressions.

step is simply a function which if the argument is negative it returns 0, if positive it returns 1 and if precisely zero it returns 0.5. So your function simply returns 1 if the node is inside the spherical region defined, and 0 if outside.

@Floor is a reference to a mesh object. Again - see the reference manual.

Lance September 17, 2013 07:12

Quote:

Originally Posted by CFDST (Post 452180)
insideSource = step((FireRadius-rSource)/unitL) - why there is a step function in this inside source and what does it mean ?

SourceArea = areaInt(SourceFlag)@Floor - in this source code what does @Floor mean ?

1) a step function gives the value 1 if positive, else 0. So, if FireRadius is less than rSource then it will return 0. /unitL is just there to make the arguments in the step function dimensionless.

2) it is a locator to a surface/boundary called Floor.

I would strongly suggest that you do a bunch of tutorials with CEL expressions in them, and also study the manual a bit.

CFDST September 17, 2013 07:48

Thank you for the replies. I'm doing a CFX course right now, and I will definetly start to read the CFX reference manual in more details, I have checked it but I should do it in more details.

1) I'm reading this reference guide
ftp://ftp.stru.polimi.it/incoming/Mirzazadeh/cfx%20docs/cfx_ref.pdf

Is it the right guide?

2) Is there a another place that I could find CEL tutorials except the ANSYS customer Portal?

Thank you.

ghorrocks September 17, 2013 07:52

Both the CFX Reference guide and the tutorial guide are installed as part of a default CFX installation.

CFDST October 14, 2013 08:45

5 Attachment(s)
Hello,

I have made the tutorials about the Expressions, CFX course and Ansys meshing. I have understand the source code for the Smoke and fire modeling and now my goal is to set a smoke source area in the middle of a small garage and see interaction between the ventilation and smoke propagation- the smoke source will be in the middle of the garage, 2 inlets and 2 outlets and big opening for fresh air .
I have made the geometry in Ansys DM and I have made all the concrete elements - the columns, the slab, the floor, and the opening. I have filled the volume with Tools->Fill ( in DM). Then I Meshed the entire volume and the next step is to transfer it to CFX.
When I transfer it to CFX, I want to set the FIll(fluid volume- Air at 25 C) and to set the concrete elements- solids with concrete material. I want to separate them one from another - the fluid region and the concrete elements.
My Question is:
1.How I can do that- to set the fluid as a fluid and to set the columns as concrete, because when I try to add a another fluid in the domain or to add a subdomain for the concrete it is not working???

I have to add all the solid elements in DM like Add Frozen???
Or I have just to add boundary conditions-Walls- of all the solid elements?

Pictures are provided below. Thank you

CFDST October 14, 2013 08:45

1 Attachment(s)
The Options for the Domain

ghorrocks October 14, 2013 17:31

First of all, something weird has happened at your inlet door thing. You will need to fix that up before proceeding.

How to set up solid/fluid simulations is covered in the tutorials - have a look at the heating coil tutorial for an example of this.

CFDST October 15, 2013 08:11

Quote:

Originally Posted by ghorrocks (Post 456943)
First of all, something weird has happened at your inlet door thing. You will need to fix that up before proceeding.

How to set up solid/fluid simulations is covered in the tutorials - have a look at the heating coil tutorial for an example of this.

Thank you for the reply.

Yes I know about the inlet door that is weird, but when I try to add a surface(by edges) to that door, at the mesh stage I cannot mesh the volume there is a error and it said to check if I have surface mesh, so I removed the surface that I made from edges and I managed to mesh the volume.
After I fill the volume with fluid this happens the area arround the door start to get weird with those strange surfaces.
I want to make a face at the door and to say that this is my Opening for fresh air?
How Can I do that?- By adding a surface or?

CFDST October 15, 2013 16:39

4 Attachment(s)
Thank you for the solid and fluid domain. I have made them and understand, but now I have three problems.

1.Again this strange thing and weird that happens at my opening. I made a extrusion(cut material) for the opening and then made surface from edges and fill the volume with fluid by Tools->Fill-> and I have chosen the six faces - 4 walls, 1 floor and 1 slab and this strange thing appears? How I can fiil the volume without this strange thing?

2. When I made the surface I mesh the volume, but when I extract it into CFX Nothing happend there is an application error in CFX and the mesh doesn't appear, It says no Automatic domains are created. How can I create a surface for the opening and then transfer the mesh to CFX?

3. When I remove the surface and remove the extrusion for the opening I mesh the volume and then it appears in CFX, but after I set the simulation parameters, I start the Solver Manager and CFX returns with error 1 ????
What is this error about???

Thank you.

ghorrocks October 15, 2013 19:39

I would not worry about the domains until you have fixed the weird inlet. You are going to get all sorts of grief from that. If the method you are usign the generate the volume is not working then try another one. For a simple geometry like this there are lots of ways you can generate the geometry.

CFDST October 22, 2013 13:50

2 Attachment(s)
Hello,

Thank you for the reply.
I have fixed my model by modeling it into Gambit and then exporting into CFX.My idea is to model the smoke concetration from a surface inlet (which rises from 0 to 1 kg/m3 for about 30 seconds) and the interaction between two jet fans and Inlet Fresh air and Pressure Outflow. The reference pressure is 1 atm, Heat Transfer= Total Energy, Buoyancy efects are included with z=-g and Buoyancy ref.density=1,1989 [kg/m3]. I'm running the simulation from Steady State Analysis to Transient entering two Flow Analysis and 2 configurations- Steady State- start of the simulation, Transient- start from end of configuration(Steady State). The duration(Total time) of the Transient Analysis is 30 s. The number of Iterations for the Steady state are 100.
Now I have 1 problem:

1. I have made a tutorial about jet fan modeling and smoke modeling. In this tutorial the jet fan is modeling by adding a subdomain to the jet fan volume and adding momentum source -80 [kg m2^-2 s^-2].I understand why this is doing(to preserve the combustion gases) but My question is:

How can I transfer this 80 [kg m2^-2 s^-2] to flow[m3/h,kg/s] or velocity[m/s] to understand how much flow this jet fan is blowing?

Thank you in advance.

p.s.Attached are pictures from the tutorial.

ghorrocks October 22, 2013 20:18

The momentum source is adding momentum. So look at what that addition of momentum does to the flow.

Momentum sources do not need to be constants. You can write momentum sources which force the flow to a particular velocity or many other things. You just have to derive the maths and off you go.

CFDST November 4, 2013 10:53

1 Attachment(s)
Hello, thank you for the reply. I have made the simulation and run the model with the Inert source code and everything works fine but I have a problem connected with the transient running of fire and the soot source.

1.I want to make the fire transient and model the fire growth after 180 [s] it gets to the Maximum growth and after that keeps the maximum fire release for a period of time and then comes the extinction. I want the whole simulation to run in 1300 [s]. My problem is to set the expressions for the fire growth, the max Power and the extiction and especially their combining in one Expression or if it is possible to run every expression at diferent time in the transient analysis I have checked into the tutorial and they set that


The power output of a transient fire tends to be described by a quadratic growth phase (P = a t^2) up to some constant maximum power (Pmax) achieved at some time (tg) which is the fire growth time. The size of the quadratic coefficient (a) determines the rate of fire growth.


National Fire Protection Association (NFPA) standardized fire growth curves:
Fire growth rate a (W/s^2)
Slow 2.9
Medium 12
Fast 47.


The fire size for the maximum power can be determined using the procedure above for a steady state fire. The power of a real fire tends to grow proportional to the cross sectional (floor) area of the fire. However, the constant of proportionality is different for differing fuels, and environmental conditions (wind, outdoor/indoor, ventilation, confinement, etc) hence the need to determine a size which gives a sensible temperature as described above. Also, real fires are typically fuelled by evaporation from a surface area, whereas the inert model described here distributes the fire power over a volume. To be consistent with the source modelling, the fire power should be set to be proportional to the source volume:
FireRadius = max((FirePower/MaxPower)^(1/3) * MaxRadius, minRadius)


If the fire power was to be set to be proportional to the area, the power density would be inversely proportional to the radius and grow as the radius shrinks, leading to spurious higher flame temperatures at smaller radii and the danger of extremely high power densities and temperatures at the start of the simulation (the power density would tend to infinity as the radius tends to zero).


The inert fire approximation is not expected to produce accurate solutions for the flame shape or the near field region, so the particular growth law for the radius is not important. What matters is maintaining sensible flame temperatures. If more accuracy than this is required you should use a combustion model.

I know how to set the Q(growth)= P*t^2 but I want to combine every thing the whole graph with the growth, the max fire and the extiction in one expression FirePower and to set this expression to be solved during the transient analysis. The graph is attatched below. My HRR is 4 MW with efficiency 0,75, because of the radiance losses.
FireEfficiency = 0.75
FirePower = 4 [MW] * FireEfficiency

How to combine the expressions for example to run and goes with the time in the different time steps, what should I enter:

FireGrowth = a*t^2 [MW] for the period of t=0 to tg=180 [s]

MaxPower= 4*0.75 [MW] for the period of t=180 to td=800[s]

FireExtinction= MaxPower*exp(-b(t-td)) for the period t=800 [s] to tf= 1300[s]



2.Second Question is connected with the soot modeling:

I add a variable soot with the following parameters:

soot
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Variable Type = Specific

I add the soot as a variable having a specific volumetric source in the fire region.

sootYield = 0.1
FuelHeat = 15 [MJ kg^-1]
FuelMassSource = FirePower/FuelHeat
massSource = insideSource*FuelMassSource/max(SourceVolume, minVolume)
sootSource = sootYield * massSource

My Question is coonnected with the Insidesource expression:

insideSource = step((FireRadius-rSource)/unitL)*step((FireHeight-hSource)/unitL)

I have understand what the step function returns if it is positive,negative or 0. I understand why we divide by UnitL

What does this expression does :
It just set the region where is the fire or something else ?

Thank you in advance.

ghorrocks November 4, 2013 18:35

You can use if statements:
if(t<800[s],if(t<180[s],{function for 0-180s},{function for 180-800s}),{function for >800s})

I do not understand your second question. Your step function concept is the way to do it and will work.

CFDST November 5, 2013 05:08

Thank you a lot for the reply.

As for the first question: Because I use the FirePower in two equations in my simulation:

1.heatSource = insideSource*FirePower/max(SourceVolume, minVolume)


2.massSource = insideSource*FuelMassSource/max(SourceVolume, minVolume)

FuelMassSource = FirePower/FuelHeat

And for example:
I set the FireProfile Expression as follows:

FireProfile=if(t<800[s],if(t<180[s],FireGrowth,MaxPower),FireExtinction) Is this Expression correct?

CEL Expressions:
FireGrowth= a*t^2 [MW]
a= 67 [W/s^2]
MaxPower=0,75*4 [MW]
FireExtinction= MaxPower*exp(-b(t-800)) [MW]
b= 0.017 [1 s^-1]

So my new expressions has to look like this or I am wrong:

1.heatSource = insideSource*FireProfile/max(SourceVolume, minVolume)


2.massSource = insideSource*FuelMassSource/max(SourceVolume, minVolume)
FuelMassSource = FireProfile/FuelHeat

As for the second question:
What does this expression do?

insideSource = step((FireRadius-rSource)/unitL)*step((FireHeight-hSource)/unitL)

Thank you in advance.

ghorrocks November 5, 2013 17:14

I will let you do the final debugging of the CEL - I suspect you might need to do some units stuff but you can sort that out.

The insideSource expression just determines whether you are inside a cylinder with a defined height. It returns 0 if you are outside and 1 if you are inside.

CFDST November 7, 2013 11:26

Thank you Sir. It works perfect after several hours of fighting with the measure units. Really appreciate all the replies. Thank you a thousand.

A_Prakash November 10, 2013 07:08

Where did you get the part on jet fan modeling? Is it new training material? And...Would mind sharing it, CFDST?

CFDST November 10, 2013 07:16

Quote:

Originally Posted by A_Prakash (Post 461396)
Would be adding jet fans too in your domain later, CFDST?

Yes I have added them yet and want to refine the mesh,because I don't like the velocity and the stream profile. Now I'm going to run a big simulation for the whole model, but I waiting for a server, because my computer will run the simulation 2 days.

CFDST November 10, 2013 07:18

Quote:

Originally Posted by A_Prakash (Post 461396)
Where did you get the part on jet fan modeling? Is it new training material?

It is in the Fourth tutorial in the CFX Introduction course.

A_Prakash November 10, 2013 09:59

Thanks for your reply, CFDST.
I got myself implementing this source routine some time ago. I got it to work for inert case then moved on to combusting model. All works fine. I added a quadratic growth curve as per NFPA92B where I reach 4MW at 290 s for fast fire growth and then hold it constant... that would be my worst case case scenario i.e. fire not becoming extinct.
I have a few questions:
1. Are you using the inert model for your garage+jet fan analysis?
2. In what way are you not staified with the velocity and stream profile? What kind of thrust you have in ur jet fan?
Many thanks!

CFDST November 10, 2013 17:57

Quote:

Originally Posted by A_Prakash (Post 461415)
Thanks for your reply, CFDST.
I got myself implementing this source routine some time ago. I got it to work for inert case then moved on to combusting model. All works fine. I added a quadratic growth curve as per NFPA92B where I reach 4MW at 290 s for fast fire growth and then hold it constant... that would be my worst case case scenario i.e. fire not becoming extinct.
I have a few questions:
1. Are you using the inert model for your garage+jet fan analysis?
2. In what way are you not staified with the velocity and stream profile? What kind of thrust you have in ur jet fan?
Many thanks!

I'm making a final project for my master degree. My main interest is connected with the smoke, I'm not interested a lot in the temperatures of the fire, the profile of it. I just want to add a source volume for the fire and a smoke that is propagating through the whole garage. I want to see the interaction between the jet fans, the big fans- inlet and outlet in case of fire.I'm making the fire with the graph shown above 2 slides- quadratic rise to 4 MW, for 200 [s] then maximum fire till 800[s] and then the extinction. As for your questions:
1.Yes I'm using the inert model for my garage+fen analysis.
2. I'm not satisfied because there are not getting the profile of the stream that I want in my opinion it is not that effective it has to be. I will show you pictures after one day,because I'm not able now. The mesh is deforming the profile a lot, because I have used a Tgrid mesh. My new model is with Hex and Tgrid and I hope it will work better.
3.I add a momentum source to a subdomain-jet fan with momentum source [kg s^-2m^-2].

I have few questions connected with the model.

CFDST November 10, 2013 18:59

Quote:

Originally Posted by ghorrocks (Post 460732)
I will let you do the final debugging of the CEL - I suspect you might need to do some units stuff but you can sort that out.

The insideSource expression just determines whether you are inside a cylinder with a defined height. It returns 0 if you are outside and 1 if you are inside.

My questions are conected with the quantity of the smoke(soot). As I am interested in the smoke(soot) propagation. I am verifying my results with a simulation that was setted with a value arround 50 000 m3/h smoke for a fire source volume of 7 [m3] After a several simulations I saw that the density of the smoke arround the fire is from 0.2 to 0,6-0,8 [kg/m3] - average 0.3 [kg/m3]. So when I replace the variables:

sootsource[kg smoke/s m^3]= (50 000 * 0.3)/(3600*7)= 0,595 [kgsmoke/ s m3]- so this is the quantity of my smoke that I want to get in my simulation.

In my simulation soot source is set with the expressions as follows:
sootYield = 0.1 [kg smoke/kgfuel]
FuelHeat = 15 [MJ kg^-1]
FuelMassSource = FirePower/FuelHeat [kg fuel/s]
massSource = insideSource*FuelMassSource/max(SourceVolume, minVolume) [kg fuel/ s*m^3]
sootSource = sootYield * massSource [ kg smoke/s m^3]
SourceVolume = volumeInt(SourceFlag)@Fire Subdomain [m3]
insideSource = step((FireRadius-rSource)/unitL)*step((FireHeight-hSource)/unitL) [-]
unitL=1 [m]
FirePower= 4 [MW] * 0.75(Efficieny)
The smoke(soot) is modeled as an additional variable with Kinematic Diffusivity = 1.0E-5 [m^2 s^-1]:
ADDITIONAL VARIABLE: soot
Option = Definition
Tensor Type = SCALAR
Units = [ ]
Variable Type = Specific
The sootsource is as source to the Fire Subdomain.

And for example If I set these parameters in the simulation:

SootYield= 0.1
Fuel Heat=15
FirePower= 4*0.75
Fuelmassource=FirePower/Fuel Heat = 0.2 [kg fuel/s]
Source Volume=0.733 [ m3]
when I try to replace this into the massSource
1.Question:I have to replace the Insidesource with 1 or 0, or to replace it with the value 21,075 ? I have get this result when I replace the variables.
Insidesource= step((-1.25-7.18)/(1))*step((0,5-3)/(1)) = 21.075

It has to look like this:
massSource=(21,075*0.2)/0.733

Or like this
massSource=(1*0.2)/0.733

>>>> ???

After I continue with the replacing for example:

massSource= 1*0.2/0.733 = 0,273 [kgfuel/s m3]
sootSource=0,1*0,266 = 0,0273 [kg smoke/ s m3]

Or
masSource= 21,075*0.2/0,733= 5,75 [kgfuel/s m3]
sootSource= 0,1*5,75= 0,575 [kgsmoke/ s m3]- This answer is almost the same with the answer mentioned above, but I'm not sure if I'm right.

2.Question:I want to ask if anybody knows with where I can rise the parameters to get this smoke value 50 000 [m3/h].

3.Question Why the SourceVolume = volumeInt(SourceFlag)@Fire Subdomain always is in the limits of 0-1 [m^3].
The SourceFlag is variable set with the algebraic equation=Insidesource

insideSource = step((FireRadius-rSource)/unitL)*step((FireHeight-hSource)/unitL)
When I change the Fire radius and the height, the value for SourceVolume is not changing at all.

I think my problems are connected with the exact value for the smoke density, the insidesource and the sourcevolume-int.
Thank you in advance.

A_Prakash November 12, 2013 11:13

1 Attachment(s)
Regarding your question on insideSource and SourceFlag:

1) I have a flowchart which you might find useful (I created it for combusting model not inert model). See attachment. Flowchart is not entirely self-contained, it is just my rough map to understand the many expressions.
insideSource expression will evaluate to either 0 and 1. It does that using step function which will check against whatever value you program. If step function evaluates to any positive value i.e. ur expression is True, it will give you '1' and you can use that output value in subsequent DEPENDENT expressions which you want to evaluate to whatever value as long as you are multiplying by 1 (i.e. the result of step function).
2)
3) sourceVolume which is Volume integral of sourceFlag should not be between 0-1, it is strange you find that is the case. I cannot verify for your case of inert model. However, in combustion model (which I implemented) it uses "sourceArea" which is area integral of sourceFlag over my 2-D fire region (called 'Floor') and it gives me the the area as per my fire radius (depends on your mesh size though the precision of the result).
In your case: Let's say, if your FireRadius=1 m and FireHeight= 1m (in the CCL FireHeight=FireRadius, correct?) and your actual 3-D fire volume (named 'Fire Subdomain') is 1 m radius and 1 m high, then your:
sourceVolume = pi*r*r*h = (pi *1*1*1)=3.14 m^3 at maximum when your fire has grown to full radius of 1m and height of 1m. Agreed? I think the tricky part in the expression is the '@Fire Subdomain' part. Make sure your fire subdomain 3-D volume is large enough so that as you grow your FireRadius and FireHeight you still remain within the geometrical 3-D limits of Fire Subdomain volume.

CFDST November 13, 2013 04:54

Thank you a lot Mr.A_Prakash, everything is very usefull.Thanks a lot. I have made this 3 months and I'm on the way to understand it.Thanks a lot. I saw that fire domain is not quite enough high to cover the fire,bacause I draw a small car for the firedomain and the fire i set in front of the car and there the height is only 0,5 [m], so may be this is a problem for the FireRadius and FireHeight, I will make a new model.

1.) First about the Insidesource I have set these values:

xFire=11.35 [m]
yFire= 5.3 [m]
zFire= 0 [m]
x=????? (it has to be my highest value ] for my garage domain x=18 [m] or the fire subdomain x= 4[m])=?????
y=????? (it has to be my highest value for my garage domain y= 8 [m] or the fire subdomain y= 4 [m])=?????
z=????? (it has to be my highest value for my garage domain z= 3[m] or the fire subdomain z= 2.2 [m])=?????
BaseRadius = max(0.25 [m], minRadius) = 0.25 [m]
FireHeight = 2*BaseRadius = 2*0.25 = 0.5 [m]
hSource= z-zfire= 3-0= 3 [m]
rSource = sqrt((x-xFire)^2 + (y-yFire)^2)= sqrt((18-11.35)^2 + (8-5.3)^2)= 7.18[m]
unitL= 1[m]
FireRadius = BaseRadius*(1-hSource/FireHeight)= 0.25*(1-3/0.5)= -1.25 [m]

insideSource = step((FireRadius-rSource)/unitL)*step((FireHeight-hSource)/unitL)

insideSource= step((-1.25-7.18)/(1))*step((0.5-3)/(1))= step(-8.43)*step(-2.5) = 0 ?????? or 1 ?????

My Questions for the Insidesource are :

1.1 What are the values for x,y,z ???
1.2 What is the value for the Insidesource???
1.3 As long as I understand from your post:

If I get value of 1, I have to set this value one to the
massSource= (1*FuelmassSource)/max(SourceVolume,minVolume)= 1*0.2/SourceVolume ????

But If I get 0 =>>> massSource= (0*FuelmassSource)/max(SourceVolume,minVolume) and in my case the massSource become equal to 0???? Am I right or ???

2.) I want to ask you about the visibility

In the expressions below:
c1 = 3.95E-4 [kg m^-2]
visibility = min((c1/max(soot*density, 1e-10[kg m^-3])), 1e3 [m])

My questions are:

2.1) C1- this is the Contrast coefficient????
2.2) soot*density- it gets the soot quantity and the density of the air near the fire in the domain for every step to evaluate the visibility or what ???
2.3) What means the value 1e-10 [kg m^-3] and the 1e3[m] ???

Thank you for the big help and sorry if there are some stupid quesitons.Thanks a thousand and all the best.

A_Prakash November 13, 2013 09:32

1 Attachment(s)
Quote:

Originally Posted by CFDST (Post 461790)
1.) First about the Insidesource I have set these values:

xFire=11.35 [m]
yFire= 5.3 [m]
zFire= 0 [m]
x=????? (it has to be my highest value ] for my garage domain x=18 [m] or the fire subdomain x= 4[m])=?????
y=????? (it has to be my highest value for my garage domain y= 8 [m] or the fire subdomain y= 4 [m])=?????
z=????? (it has to be my highest value for my garage domain z= 3[m] or the fire subdomain z= 2.2 [m])=?????
BaseRadius = max(0.25 [m], minRadius) = 0.25 [m]
FireHeight = 2*BaseRadius = 2*0.25 = 0.5 [m]
hSource= z-zfire= 3-0= 3 [m]
rSource = sqrt((x-xFire)^2 + (y-yFire)^2)= sqrt((18-11.35)^2 + (8-5.3)^2)= 7.18[m]
unitL= 1[m]
FireRadius = BaseRadius*(1-hSource/FireHeight)= 0.25*(1-3/0.5)= -1.25 [m]

insideSource = step((FireRadius-rSource)/unitL)*step((FireHeight-hSource)/unitL)

insideSource= step((-1.25-7.18)/(1))*step((0.5-3)/(1))= step(-8.43)*step(-2.5) = 0 ?????? or 1 ?????

In the above case insideSource is 0. No doubt. Note that x,y,z are not single final values. These will be evaluated over entire domain extent. So....
First of all: xFire, yFire and zFire are origin/or center of fire. These are reference to the center of your fire. Example: If the center of the bottom face of your "Fire Subdomain" volume coincides with global x,y,z of 0,0,0 then you should have xFire=0, yFire=0, zFire=0. And if you see rSource expression (nothing but distance formula in geometry), it calculates how far your radius is from this origin - (I mean, xFire and yFire) for given x,y - this x,y is evaluated over entire domain. Similarly, hSource calculates how much height you have from zFire coordinate for a given z. The best way to visualize this is to go to CFD-Post and create a variable, call it "myRadius", and now create contour plot of "myRadius" on slice planes at your Fire Subdomain origin. Try and see. Do the same for hSource. I have attached a pic.



Quote:

Originally Posted by CFDST (Post 461790)
2.) I want to ask you about the visibility

In the expressions below:
c1 = 3.95E-4 [kg m^-2]
visibility = min((c1/max(soot*density, 1e-10[kg m^-3])), 1e3 [m])

My questions are:

2.1) C1- this is the Contrast coefficient????
2.2) soot*density- it gets the soot quantity and the density of the air near the fire in the domain for every step to evaluate the visibility or what ???
2.3) What means the value 1e-10 [kg m^-3] and the 1e3[m] ???

Thank you for the big help and sorry if there are some stupid quesitons.Thanks a thousand and all the best.

2.1) c1 is just a coefficient. I read somewhere it is 'contrast coefficient' but I don't have the reference..so I will keep shut.Let's just call it a constant.
2.2) Yes. that is correct.
2.3) 1e-10 [kg m^-3] is to put a bound on the calculation..to avoid numerical division by zero i think. 1e3[m] is to put upper limit on your visibility. Check CFD-Post for global min and max values of visibility... max is 1000m or 1e3[m]

CFDST November 13, 2013 11:07

2 Attachment(s)
Thank you a thousand Sir. Thank you a lot. A lot thanks to You and Mr.ghorrocks and all the repliers. After I made a different simulation with a bigger volume, everything works perfect, my smoke quantity works better know, the source volume is from 0 to 1.53 m^3, and I found the visibility and all the other missing part from the puzzle. Thank you a lot, I am continuing to work on my model and after several days I hope to run my simulation on the server. Thanks a lot.

My profile of the jet fan is getting better but still, I'm not satisfied at all.

I think because I'm used to Gambit and my geometry is made in there, and the mesh also. The flow in the jet fan doesn't look very good. In the Inside of the jetfans it is clear and looks good but after that when it enters the domain it is awfull in my opinion.The mesh is TGrid for the Entire Volume and the Fire subdomain, and Hex/Wedge for the Jet Fan There are pictures attached down.

What do you think:

1.Is it possible to make the simulation with a geometry from Gambit and run it into CFX to get good and real results ? because when I made the geometry on the top of my Gambit window there is sign: [ GAMBIT Solver:Fluent 5/6 ID: Name of the project ]. I have heard the difference between the CFX and Fluent solver- about the nodes ( CFX) and the cells(Fluent). Or may be I have to make it into Ansys Design Modeler or another program. I have the geometry also made into Autocad too- but I dont know to make it by surfaces or to be union solid and then the extraction and cleaning?

Thank you in advance.

ghorrocks November 13, 2013 16:42

I can see from your image you have a very coarse mesh. You are never going to get an accurate simulation with a mesh that coarse. You need to make a finer mesh. How fine? Do a mesh size sweep and check the sensitivity.

CFDST November 13, 2013 18:19

Quote:

Originally Posted by ghorrocks (Post 461869)
I can see from your image you have a very coarse mesh. You are never going to get an accurate simulation with a mesh that coarse. You need to make a finer mesh. How fine? Do a mesh size sweep and check the sensitivity.

Thank you for the reply. I will refine the mesh definetly, but

1. How to make a mesh size sweep and check the sensitivity? This should be done into Gambit, or into CFD Setup, or into CFD Post processing?

2.Is possible to use Gambit for the simulation with CFX?

Thank you.


All times are GMT -4. The time now is 05:09.