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. 
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.91.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((xxFire)^2 + (yyFire)^2) hSource = zzFire insideSource = step((FireRadiusrSource)/unitL)*step((FireHeighthSource)/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*(1hSource/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.0E5 [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.0E6 [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, noninteracting spheres at the same temperature as the gas they are immersed in. # # Visibility # Visibility can be calculated on a local basis using the lightreflecting 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.95E4 [kg m^2] visibility = min((c1/max(soot*density, 1e10[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. 
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.91.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((xxFire)^2 + (yyFire)^2) insideSource = step((FireRadiusrSource)/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.0E5 [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.0E6 [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, noninteracting spheres at the same temperature as the gas they are immersed in. # # Visibility # Visibility can be calculated on a local basis using the lightreflecting 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.95E4 [kg m^2] visibility = min((c1/max(soot*density, 1e10[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. 
Can you get the inert model working? That would seem to be the obvious first step.

Quote:
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 ? 
I'm upploading them right now

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. 
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. 
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. 
Thank you for the reply. I'm start to dealing with it right now.
And I have a question: insideSource = step((FireRadiusrSource)/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. 
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. 
Quote:
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. 
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. 
Both the CFX Reference guide and the tutorial guide are installed as part of a default CFX installation.

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 conditionsWalls of all the solid elements? Pictures are provided below. Thank you 
1 Attachment(s)
The Options for the Domain

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. 
Quote:
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? 
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. 
All times are GMT 4. The time now is 21:19. 