
[Sponsors] 
Numerical treatment of the source term in combustion equations 

LinkBack  Thread Tools  Search this Thread  Display Modes 
September 7, 2016, 17:37 

#21  
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
Hi all,
well I want to split the calculation into: a) Calculate the source terms omega and update the Y values b) Solve the transport equation At the moment I am only interested in the steadystate solution (no transient). for a) I would do the following: [LaTeX Error: Syntax error] Solving that stiff system with the BDF like: Here I update the "old" values with the BDF method and then I solve the transport equation (simple one). Of course the above equation has to be looped till I get steadystate here. Quote:
__________________
Keep foaming, Tobias Holzmann 

September 7, 2016, 17:47 

#22 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,850
Rep Power: 73 
Actually, if you consider the splitting and you adopt an implicit method, you have to consider that, say Y* the intermediate field, the equation writes as
Y* dt S(Y*)=Y^n1 

September 7, 2016, 20:43 

#23  
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 
Quote:
https://en.wikipedia.org/wiki/Linear_multistep_method ABM schemes use the RHS value at two or more different time levels, rather than using multiple old time values of the solution. They generally work better than highorder backward differencing. If you are a building a split implicit/explict scheme, Trapzoidal Rule (2ndorder Adams Moulton) for the implicit terms and 2ndorder Adams Bashforth for explicit terms often work well. 

September 8, 2016, 04:13 

#24  
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
Quote:
Quote:
__________________
Keep foaming, Tobias Holzmann 

September 8, 2016, 05:16 

#25 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,850
Rep Power: 73 
Actually, you cannot get higher order accuracy even using AB methods, the reason being in the splitting. Immagine you work first without splitting. Integrating in time you get
Y^n+1Y^n = Int[tn+1;tn] ( D d2 Y/dx^2 + S(Y)) dt Now, with the splitting you solve Y*Y^n = Int[tn+1;tn] S(Y*) dt Y**Y* = Int[[tn+1;tn] ( D d2 Y**/dx^2) dt Therefore, the best you can get (but with some care), is only second order accuracy in time. 

September 8, 2016, 07:16 

#26 
Senior Member

Still, unless there is some specificity regarding chemical source terms, as he intend to just reach the steady state, i guess such effort on the time acuracy is not actually worth it. He jest needs to keep it stable and consistent, not time accurate.


September 8, 2016, 07:28 

#27 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,850
Rep Power: 73 
That's true Paolo, however at the steady state only the time derivatives in the truncation error vanish. I am not sure If the remaining spatial derivatives retain some time step multiplication so that the temporal accuracy enters into the global accuracy.
But I agree, I wouldn' take too care of time accuracy in a first stage of a steady solution. 

September 8, 2016, 07:34 

#28  
Senior Member

Quote:


September 8, 2016, 07:45 

#29  
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
Dear all,
Quote:
Quote:
If you are interested, I will keep you up to date with the latest results. Unfortunately I will not find time the next 4 days ...
__________________
Keep foaming, Tobias Holzmann 

September 12, 2016, 17:10 

#30 
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
Dear all,
it would be very helpful to get some feedback about section 1.2.2 in the attachment. The PDF is just a draft so nothing is finished http://holzmanncfd.de/forumCases/UserGuide.pdf
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; September 12, 2016 at 17:32. Reason: Corrected section 1.5 to 1.2.2 

September 12, 2016, 17:19 

#31  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,850
Rep Power: 73 
Quote:


September 12, 2016, 22:41 

#33 
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 
Tobias
What is the size of system we are talking here. Does it depend on number of species we are talking about. So if you took the coupled system then does the system is of size Nspecies x Nspecies. If thats the case can't you use direct solver on coupled system, you can use some multifrontal solver. I believe some open libraries are there that provide it. 

September 12, 2016, 23:59 

#34 
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 
I don't completely understand your flamelet formulation, but I grasp the essential ideas you are working towards. I am a bit concerned that you are choosing a timestep for the X updates and then iterating to convergence while picking a different timestep for your Y updates. This *may* be OK in the limit of large time, but my gut tells me that it does not preserve the relative time scales of the reaction and the transport terms. This convergence loop seems like it should essentially just give you equilibrium chemistry results at every timestep. I think I can follow your recipe and choose the two different timesteps independently and generate very different physical results and, of course, that indicates that the scheme in inconsistent.. Again, I haven't proved or tested this, but I see it as a potential problem.
Stiff (split) chemistry solvers usually assume a transport time step (DT) based on CFL or some other criteria. Then, reaction timesteps (dt) are chosen to evolve the system from t_0 to (t_0 + DT). Usually, dt << DT. But, you step forward the reactions to t_0 + DT, and then you evolve the transport fractional step to t_0 + DT. This retains consistency between the transport and the reaction timescales automatically and gives time accurate results. This will, of course, provide consistent steady state results as well as you take t>inf. But choosing different timesteps changes the effective timescale of eachtechniques exist to precondition pseudotimestepping schemes that discard time accuracy to get faster convergence, but those techniques are complicated and maintain the relative scale of the terms as time goes to infinity. 

September 13, 2016, 03:04 

#35  
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
Quote:
the number of systems depend on two things. First the space discretization (mixture fraction) depend on the number of points we want to have. Lets say 100 and within one discrete point, the chemical source term depend on the number of species that are included within the detailed chemistry. The Jacobian is a nSpecies x nSpecies matrix. The fact that I do not want to use some open libraries are as follow: I want to make my hands dirty to understand things in more details I know that it is somehow stupid to reinvent the tire but for a good understanding, it is necessary for me (I am not a genius  unfortunately) Quote:
Quote:
Quote:
Note that till now I am not solving the temperature equation. I hope to find time to add this to the figure in section 1.2.2 today evening. Thanks for your replays.
__________________
Keep foaming, Tobias Holzmann 

September 13, 2016, 16:08 

#36 
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
I made changes to the calculation procedure. I really appreciate your opinions. Thanks in advance. The file is updated and is the same as before, or just »click«
__________________
Keep foaming, Tobias Holzmann 

March 20, 2017, 09:58 

#37  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 
Quote:
The current version uses VODE based species stiff ode integration and I use operator spliting method that fluent and starccm typically offer. StarCCM also offers something called Chemistry ADI (This is what i believe they call it) that can handle even larger time steps. I am not looking at it at the moment but in future if i am unhappy with operator splitting i might visit it. Next week or so I try to validate the solver with various sets up and see how robust it is. So far looks good but it has not done any challenging thing too. Last edited by arjun; March 20, 2017 at 11:47. 

September 15, 2020, 14:42 

#38 
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 
Hi All,
I am creating a simple solver that involve transport and reaction. Different from Tobi's purpose, I would like to get the time accurate solution. I think this post is relevant and also extended from the original discussion. Here is what I have done so far. I would like to hear your valuable advices to improve the solver's efficiency since I am really interested in simulate the transport and reaction for a large timescale ~ hr to day. 1. First I solve the reaction term dY/dt = f(Y) only with the ODE solver in OpenFOAM from t0 to t0+Dt with Dt being the time step size of the transport equation. Y0 and YEnd is the initial and final results at t0 and t0+Dt in this ODE. The ODE time step size (dt) that is automatically determined by the ODE solver of OpenFOAM so that sufficiently small to meet the error tolerance. 2. Second I construct the source term as dYdt = (YEndY0)/Dt. 3. Third shuffle the dYdt as an explicit source term to the transport equation and solve the transport equation. Here are my questions: I would like to take the time step (Dt) as large as possible. But I observe that the transient solution has depends on the time step size in the transport solver (Dt). The solution changes even I reduce the time step size to 1e2, which is very challenge to the intended simulation length (hr to day). What is the bottleneck of the code? I guess this way to split the equation is only first order accurate. Will Strang splitting help? Without too much of work, Strang splitting can be implemented with the first order time integration scheme for the transport equation. Based on the exsiting first order splitting, I can use second order scheme for the transport equation. If one choose the accuracy between splitting and transport, which one' accuracy should be prioritized? How can I estimate the time scale of the reaction? Thanks in advance, Rdf Last edited by randolph; September 15, 2020 at 16:35. 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
what is swap4foam ??  AB08  OpenFOAM  28  February 2, 2016 02:22 
[Other] Adding solvers from DensityBasedTurbo to foamextend 3.0  Seroga  OpenFOAM Community Contributions  9  June 12, 2015 18:18 
OpenFOAM without MPI  kokizzu  OpenFOAM Installation  4  May 26, 2014 10:17 
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error  FerdiFuchs  OpenFOAM Community Contributions  27  April 16, 2014 16:14 
DecomposePar links against liblamso0 with OpenMPI  jens_klostermann  OpenFOAM Bugs  11  June 28, 2007 18:51 