CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to solver coupled transport equations (

chris1980 June 29, 2006 12:31

I want to solve 2 scalar trans
I want to solve 2 scalar transport equations which are coupled.

I was wondering how to treat the equation intercoupling in OpenFOAM? Can anybody tell me how to do this?

mprinkey June 29, 2006 18:46

What is the nature of the coup
What is the nature of the coupling? If it is coupling of a source form like:

c(phi_0 - phi_1)

it is possible to partial elimination to nice accelerate inter-scalar coupling. I suggest you show the full form of the scalar equations you are trying to solve.


chris1980 June 30, 2006 04:28

it is more a general question
it is more a general question how to solve coupled scalar transport equations.

Is anybody able to show the "general" way how to deal with inter-equation coupling in OpenFOAM?

mprinkey June 30, 2006 06:09

OpenFOAM currently only handle
OpenFOAM currently only handles segregated-type solution procedures...only a single unknown field can be solved at a time. So solving two scalar fields require an iterative/timestepping scheme that did successive substitution. Something like:

solve(fvm::...(phi_0) == fvc::...(phi_1));
solve(fvm::...(phi_1) == fvc::...(phi_0));

The first solve will compute explicitly the phi_1 contribution in the first equation and then solve it implicitly for the new value of phi_0. The reverse happens in the second solve--source terms are computed using phi_0 and then phi_1 is solved implicitely. After iterating several times, the phi_0 and phi_1 fields will become consistent (we hope).

Now, this will fail to converge or converge slowly if there is strong coupling between the scalar equations. If the coupling form is as I mentioned in the earlier post, then there is a nice trick (partial elimination algorithm) that will allow you to approximate the coupling term between the two scalars and significantly increase robustness and convergenece.

To do more generally coupled scalar fields will require a block solver. That will allow the simultaneous solution of phi_0 and phi_1 and allow all of the terms to be treated implicitly. Such as solver mechanism is currently unavailable in OpenFOAM.


chris1980 August 18, 2006 06:24

It there somewhere a example h
It there somewhere a example how to solve couled equations (not p-U coupling) in OpenFOAM?

chris1980 August 25, 2006 07:49

Can someone push me into to di
Can someone push me into to direction how to solve coupled scalar equation in a general way?

I think this is a popoular issue and many people are interessted in. I cannot find any reference in the tutorials or in the discussion forum.

mprinkey August 25, 2006 08:05

Chris, I answered your ques

I answered your question back in June. There are no coupled linear equation solvers currently availabe in OpenFOAM. The solution approach is to freeze one of the scalars, compute terms based on that scalar explicitly (with fvc:: operators) and solve for the other scalar implicitly (with fvm:: operators.) Then freeze the other scalar and treat the other implicitly. Then just iterate until the system converges. If you are still having difficulty understanding this, please post the equations you need to solve. Perhaps an example would help.


chris1980 August 25, 2006 08:18

Yes you are right Mike, I was
Yes you are right Mike, I was just wondering if there is any example how to do this. I want to solve the following 2 transport equation for XiVar and Chi:

ddt(rho, XiVar) + div(phi, XiVar) - laplacian(turbulence->mut()/Sct, XiVar) == C1*(turbulence->mut()/Sct)*magSqrGradXi - rho*Chi

ddt(chi) == Su(C1*turbulence->epsilon/turbulence->k,chi) + C2*(1/XiVar)

Note: I know this is not correct Foam syntax. This is just to present the equations I want to solve.

All times are GMT -4. The time now is 18:48.