CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Explosion Simulation in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 2 Post By opedrofunk
  • 1 Post By RaKuh
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2019, 10:27
Default Explosion Simulation in OpenFOAM
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I am wondering if anyone of you already used OpenFOAM for explosion simulations. E.g., a pipe is partially filled with CH4, O2, and N2 while the mixture is ignited instantaneously. Thus, the mixture starts to react, and a pressure wave should run through the pipe while the rest of the mixture is converted. I added a picture to get a better view.
  • Starting the simulation without chemistry, to fill the pipe partially with CH4
  • Set a high temperature at the location of ignition
  • Activating combustion
  • The mixture should start burning while an explosion wave should follow


The first part is working fine (filling the pipe). However, I am not sure if the ordinary FOAM solvers can handle that situation. I am using rhoReactingFoam at the moment. As it is an already premixed situation, the XiFoam solver may suit better. Furthermore, I am not sure which combustion model should be used? I am only familiar with the flamelet model, but for such cases, it is not possible to use already existing SLFM (steady-state laminar flamelet model) without modifications (as it is for steady-state situations).

The main part of the investigation is the pressure wave that is generated during the explosion.
Using the reactingFoam solver, the combustion starts at the beginning, and after that, the temperature decreases significantly, and no combustion happens anymore.
Attached Images
File Type: png CH4.png (25.3 KB, 164 views)
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; March 26, 2019 at 03:35.
Tobi is offline   Reply With Quote

Old   March 27, 2019, 08:23
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I found a statement in the forum which is interesting and enables the combustion propagation. Surely, the result has to be valid. To get the flame propagation, one has to set a high temperature in the center of combustion (starting zone) AND in addition, the fuel and oxidate species to zero. In my example above, one has to set the concentration of CH4 and O2 to zero. After a few milliseconds, the combustion starts and the flame propagates.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 30, 2019, 11:09
Default blastFoam solver
  #3
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi Tobias,

We just released blastFoam, which a new solver for multi-component compressible flow with specific application to high-explosive detonation. Perhaps it might provide a good base that you can extend/apply to your specific problem?

https://github.com/synthetik-technologies/blastfoam

Best regards,
Peter
Peter_600 and Tobi like this.
opedrofunk is offline   Reply With Quote

Old   October 30, 2019, 14:33
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Thank you for the hint.


I would need a while to understand what you exactly did here. It is a complete own calculation semantics (:

Was missing the UEqn, pEqn header file (;
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   November 2, 2019, 19:32
Default
  #5
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Have a look at the Theory/User Guide in the repo - we've kept the variable names pretty consistent, so it should be helpful if you're looking to extend the solver. :-)

Last edited by opedrofunk; November 2, 2019 at 19:33. Reason: typo
opedrofunk is offline   Reply With Quote

Old   December 24, 2019, 09:35
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Peter,


I built a test case for simulating an explosion within a exhaust gas duct. Please see the following video in which I injected methane into the exhaust gas duct. Here I used rhoReactingFoam while solving two species, O2 and CH4 (rest is N2). What I did right now:


1. Flow simulation (single phase)

The first simulation was a steady-state analysis of the geometry. The main focus was to develop the flow inside the exhaust gas system (https://twitter.com/HolzmannCFD/stat...30652054933504)


2. Injection of methane (single phase with 3 species)

Starting with the steady-state solution, I released methane (0.04 mass-%) at the inlet of my system into the exhaust gas duct for 1 s. (https://youtu.be/YTJffQhi6cI)


3. Explosion analysis with the results from 2.

Now I want to start the explosion/combustion of the gas mixture. I went through your blastFoam and it seems very interesting, even though, I have no idea how you calculate the released energy.

Okay, as I do have a system of CH4, N2 and O2, I am not sure if blastFoam can handle such things? In the tutorials I see that you are mostly use some solid material (TNT, C4) which is ignited. However, as I do have 3 species but actually it is one phase, I am not sure if blastFoam is the appropriate solver as a set-up of:


Code:
phases (N2 CH4 O2);


CH4
{
    type idealGas;
    ...

}



O2
{
    type idealGas;
    ...

}


N2
{
    type idealGas;
    ...

}
Does not make much sense to me. For solids one can specify the initial detonation energy. However, for the methane / air mixture, one has to use some chemistry to calculate the released energy.


By the way, the small "e" is not defined in your user guide (on page 8 it will be clear that it is the internal energy but before there is no statement about that quantity).
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 3, 2020, 05:14
Default
  #7
New Member
 
Join Date: Nov 2017
Posts: 3
Rep Power: 8
RaKuh is on a distinguished road
Hi Tobias,

I used XiFoam for a similar simulation, where I ignited premixed 14vol% C2H2/Air.
To do this, I fitted the gulders-coefficients for combustionProperties on a dataset generated with cantera and put the right enthalpy values in thermophysicalProperties (got the single values from the JANAF-Table and mixed my fuel).
The laminar flame-speed turned out to be a little higher than the experiment (~5-10%), but the overall result was in good agreement with the experiment.
Since XiFoam doesn't do the actual chemistry, it is significiantly faster than reactingFoam.
If anyone here is interestet, I can search for a test case and post it, but it is pretty close to the existing moriyoshiHomogeneous case.
Tobi likes this.
RaKuh is offline   Reply With Quote

Old   January 3, 2020, 07:25
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Interesting point. I would like to get more information on how you fitted the data. Unfortunately, I am not familiar with the Xi-Model. I only know the flamelet model in terms of combustion. I know Cantera but I was not able to get things up running
Peter_600 likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 3, 2020, 08:33
Default
  #9
New Member
 
Join Date: Nov 2017
Posts: 3
Rep Power: 8
RaKuh is on a distinguished road
[deleted, duplicate to next one]

Last edited by RaKuh; January 7, 2020 at 01:34. Reason: duplicate to next post
RaKuh is offline   Reply With Quote

Old   January 3, 2020, 08:48
Default
  #10
New Member
 
Join Date: Nov 2017
Posts: 3
Rep Power: 8
RaKuh is on a distinguished road
Hi,
here is a simple python script to get startet with... not a nice style, but does the job
Code:
import cantera as ct
import numpy as np
import sys

# Simulation parameters
filename = "acetylene14-ravib.asc"
Ppoints = 5
Tpoints = 10
Qpoints = 10
Pin = np.linspace(400000, 4000000, Ppoints) # pressure [Pa]
Tin = np.linspace(250, 1000, Tpoints)  # unburned gas temperature [K]
phi = np.linspace(0.5, 3, Qpoints) # EqR
width = 0.4  # m
loglevel = 1  # amount of diagnostic output (0 to 8)

# phases
gas = ct.Solution('gri30.xml')
mix_phases = [(gas, 1.0)]
mix = ct.Mixture(mix_phases)

# gaseous fuel species
fuel_species = 'C2H2:1'#Acetylene

fo=open(filename, "w+")
fo.write('P(Pa) Q T(K) Sl(m/s)\n')
fo.close()

for P in range(Ppoints):
    for Q in range(Qpoints):
        for T in range(Tpoints):
            # set the gas state
            gas.set_equivalence_ratio(phi[Q], fuel_species, 'O2:2.5, N2:9.4')#Acetylene
            mix = ct.Mixture(mix_phases)
            mix.T = Tin[T]
            mix.P = Pin[P]
            # equilibrate the mixture adiabatically at constant P  
            f = ct.FreeFlame(gas, width=width)
            f.set_max_time_step(1000)
            f.set_refine_criteria(ratio=3, slope=0.06, curve=0.12)
            f.transport_model = 'Mix'
            f.solve(loglevel,auto=True,refine_grid=True)
            fo=open(filename, "a")
            fo.write('{0:7f} {1:7f} {2:7f} {3:7f}\n'.format(Pin[P], phi[Q], Tin[T], f.u[0]))
            fo.close()
The data can then be fitted to the Gulders formulation (p.19) or the Ravi+Petersen formulation.
I did the fitting itself with gnuplot.
Don't forget to adapt your thermophysicalProperties. The raw-data can be found here.
The coefficients are additive, so mix each of them according to the mole fraction.

I hope this helps.
RaKuh is offline   Reply With Quote

Old   June 5, 2020, 05:35
Default Bkw eos
  #11
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Hi all,

I have compiled blastFoam V. 3.0.1 on my OF7.
Although it is mentioned in the main page of this solver that this version includes BKW EOS, it is not defined in the suggestion list, when I run the solver!

http://www.lib4dev.in/info/synthetik...foam/216699151

Anyone who knows how to solve an explosion problem with BKW EOS?

Thanks
alimea is offline   Reply With Quote

Old   June 5, 2020, 05:38
Default
  #12
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Hi all,

I ran the "blastWall" case (presented in the second version of blastFoam) to compare the results of the code with the reference, and faced with some questions:

- The dimensions which is set for the canopy are : 0.1524 X 0.6858 (6" X 27"). However, none of the dimensions reported in table 1 is not equal to the mentioned dimensions.

- The results of the reference paper were presented in table 2 through the table 11. The 8 lb explosive mass was chosen, so the validation should be done using table 5-8.

Could you please tell me which table of the paper contains the results of the case which was presented in the blastWall case? and at which time?

Regards,
Ali
alimea is offline   Reply With Quote

Old   June 5, 2020, 09:43
Default Bkw eos
  #13
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hello,

The BKW EOS is available in blastFoam. It is not, however, compiled by default in the public release, as it is still an experimental feature and has not been extensively tested or validated. If you do want to work with the BKW EOS, you can enable it by simply un-commenting the relevant sections of the code and rebuilding blastFoam.

Kind regards,
Peter
opedrofunk is offline   Reply With Quote

Old   June 7, 2020, 08:31
Default
  #14
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by opedrofunk View Post
Hello,

The BKW EOS is available in blastFoam. It is not, however, compiled by default in the public release, as it is still an experimental feature and has not been extensively tested or validated. If you do want to work with the BKW EOS, you can enable it by simply un-commenting the relevant sections of the code and rebuilding blastFoam.

Kind regards,
Peter
Dear Peter,

Thanks for your response.

I found some new parameters in phaseProperties such as fvDOMCoeffs (and parameters in it), absorptionEmissionModel, constantCoeffs, scatterModel, sootModel,... that were not in the previous versions. I have searched in the user Guide and have not found anything about them.
In addition, for "c4" in one of the examples, you allocated "Murnaghan" EOS as reactants and "JWL" EOS as products. There was not this kind of grouping (product and reactant) in "MieGruneisenEOSProperties file. Where was the solid EOS in the previous versions?
Where can I find more information about that?
Why did you use "Murnaghan" EOS in reactants?

The reason for using "activationModel" is to reduce the cell of involved in solution? is it important that which model is selected?

Could you please answer the other question (2 posts ago)?

Regards,
Ali
alimea is offline   Reply With Quote

Old   August 12, 2020, 11:39
Default
  #15
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by opedrofunk View Post
Hello,

The BKW EOS is available in blastFoam. It is not, however, compiled by default in the public release, as it is still an experimental feature and has not been extensively tested or validated. If you do want to work with the BKW EOS, you can enable it by simply un-commenting the relevant sections of the code and rebuilding blastFoam.

Kind regards,
Peter
Dear Peter,

I have uncommented the BKW model as following files:

1- thermoModels.H: line 57: #include "BKW.H"
2- thermoModels.H: defineThermoTypes ( ... )
3- basicFluidThermos.C: addFluidThermos ( ... )

and compiled it without any error.

However, when I want to solve a problem with BKW, the solver consider it as an "unknown fluidThermo type"

Is there any other step that I didn't do it?

second ques. :
What's difference between "equationOfStates" and "MGEquationOfStates"

thanks
alimea is offline   Reply With Quote

Old   August 13, 2020, 17:26
Default
  #16
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by alimea View Post
Dear Peter,

I have uncommented the BKW model as following files:

1- thermoModels.H: line 57: #include "BKW.H"
2- thermoModels.H: defineThermoTypes ( ... )
3- basicFluidThermos.C: addFluidThermos ( ... )

and compiled it without any error.

However, when I want to solve a problem with BKW, the solver consider it as an "unknown fluidThermo type"

Is there any other step that I didn't do it?

second ques. :
What's difference between "equationOfStates" and "MGEquationOfStates"

thanks
This problem is still remained.
Is there any body who knows the answer?
alimea is offline   Reply With Quote

Old   August 14, 2020, 03:45
Default
  #17
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Hi

I wnat to find the best set of values of model-constants of JWL and BKW models. I solved the problem of blastWall in simulation of experiments of Beyer for a wide range of A, B, R1, and R2 for omega = 0.25, E0=9e9. But the difference between the results of various values of model-constants is very low!



Do you know why?!
Is it acceptable that the results are the same in different values of A, B, R1, and R2?

thanks
alimea is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFoam 4.1: interDyMFoam LES Simulation for hydro turbine in river pi__sec OpenFOAM Running, Solving & CFD 13 July 19, 2017 04:08
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 19:20
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
diesel Engine simulation in OpenFOAM karam OpenFOAM Running, Solving & CFD 1 March 1, 2011 09:46
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25


All times are GMT -4. The time now is 14:03.