|
[Sponsors] |
March 25, 2019, 11:27 |
Explosion Simulation in OpenFOAM
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
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.
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.
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; March 26, 2019 at 04:35. |
|
March 27, 2019, 09:23 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
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 |
|
October 30, 2019, 12:09 |
blastFoam solver
|
#3 |
Member
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11 |
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 |
|
October 30, 2019, 15:33 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
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 |
|
November 2, 2019, 20:32 |
|
#5 |
Member
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11 |
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 20:33. Reason: typo |
|
December 24, 2019, 10:35 |
|
#6 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
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; ... } 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 |
|
January 3, 2020, 06:14 |
|
#7 |
New Member
Join Date: Nov 2017
Posts: 3
Rep Power: 8 |
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. |
|
January 3, 2020, 08:25 |
|
#8 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
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
__________________
Keep foaming, Tobias Holzmann |
|
January 3, 2020, 09:33 |
|
#9 |
New Member
Join Date: Nov 2017
Posts: 3
Rep Power: 8 |
[deleted, duplicate to next one]
Last edited by RaKuh; January 7, 2020 at 02:34. Reason: duplicate to next post |
|
January 3, 2020, 09:48 |
|
#10 |
New Member
Join Date: Nov 2017
Posts: 3
Rep Power: 8 |
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() 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. |
|
June 5, 2020, 06:35 |
Bkw eos
|
#11 |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
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 |
|
June 5, 2020, 06:38 |
|
#12 |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
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 |
|
June 5, 2020, 10:43 |
Bkw eos
|
#13 |
Member
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11 |
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 |
|
June 7, 2020, 09:31 |
|
#14 | |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
Quote:
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 |
||
August 12, 2020, 12:39 |
|
#15 | |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
Quote:
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 |
||
August 13, 2020, 18:26 |
|
#16 | |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
Quote:
Is there any body who knows the answer? |
||
August 14, 2020, 04:45 |
|
#17 |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
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 |
|
|
|
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 05:08 |
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days | joegi.geo | OpenFOAM Announcements from Other Sources | 0 | October 1, 2016 20:20 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |
diesel Engine simulation in OpenFOAM | karam | OpenFOAM Running, Solving & CFD | 1 | March 1, 2011 10: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 07:25 |