# Implementing coupled transport equation

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

 March 11, 2022, 11:40 Implementing coupled transport equation #1 Member   Join Date: Jun 2020 Posts: 49 Rep Power: 6 Hello everyone, I am currently trying to implement two additional, coupled transport equations to the reactingFoam solver. I know how to add and solve for equations generally, though I am not sure how to correctly implement the coupled nature of those equations. The first equation is a regular scalar transport equation with a instationary, convective and diffusion tem for the scalar "f". This part is straight forward. The second transport equation for the scalar "m" also has those regular terms, but also a diffusive term as well as a source term that involve "f". I have read about fvm:: being implicit and fvc:: being an explicit function. Would it be correct to first solve the equation for "f" and use the calculated field in the equation for "m" using fvc:: ? Or is there a way to more accurately take the coupling into account? I hope this explanation is understandable. Would appreciate if anyone could give some input.

 March 16, 2022, 15:00 #2 Senior Member   Michael Alletto Join Date: Jun 2018 Location: Bremen Posts: 616 Rep Power: 16 OpenFOAM uses segregated solution algorithms. So one equation for each variable is solved after the other. So you have to solve for f and insert the as solution of go from the previous time step

 March 18, 2022, 10:52 #3 Senior Member   Join Date: Apr 2020 Location: UK Posts: 715 Rep Power: 14 Just to add to Michael's answer, can I suggest that you take a look at a compressible solver like rhoSimpleFoam. The heart of this solver is Code: ``` #include "UEqn.H" #include "EEqn.H" #include "pEqn.H"``` i.e. it solves the velocity momentum predictor, then solves the energy equation (thereby updating the T field, based on the old p field) and then calculates the new p field, and uses that to correct the velocity field. But of course, p and T are coupled through the equation of state, and so some approximation was necessary with this segregated approach (i.e. p and T are out of sync slightly). In a truly coupled solver, p & T would be solved simultaneously ... but as Michael explains, OF does not contain such a solver (as far as I am aware). You can draw a direct analogy to your problem, from the above, Hope that helps.

 March 18, 2022, 10:57 #4 Senior Member   Michael Alletto Join Date: Jun 2018 Location: Bremen Posts: 616 Rep Power: 16 Foam extend has block coupled solver which allows to solve for multiple variables at once. The com and org versions do not have coupled solvers Tobermory likes this.

 March 20, 2022, 20:39 #5 New Member   Dylan Join Date: Mar 2022 Posts: 1 Rep Power: 0 OpenFOAM uses segregated solution algorithms. ultra pixel survive

 March 21, 2022, 03:49 #6 Member   Join Date: Jun 2020 Posts: 49 Rep Power: 6 Thanks for the explanations, everyone! That helps a lot.

 Tags scalar transport, solvecoupled, solver development