CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Solving coupled scalar transport equations in openFoam

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

LinkBack Thread Tools Search this Thread Display Modes
Old   December 27, 2019, 04:58
Default Solving coupled scalar transport equations in openFoam
New Member
Pavan Inguva
Join Date: Dec 2019
Location: Singapore
Posts: 7
Rep Power: 5
pavaninguva is on a distinguished road
Hi, I am trying to solve a series of coupled scalar transport equations i.e. temperature and chemical species transport for reacting flows by modifying icoFoam. I understand from a past forum post (quite a while ago) (How to solver coupled transport equations), that an iterative scheme is needed within openFoam.

If anyone could share what is the best practice for doing so, or if there a better way of solving these coupled equations, that would be immensely helpful. The model equations are as follows:
\frac{\partial T}{\partial t} + \bold{u}\cdot \nabla T = \alpha \nabla^{2}T + \sum_{i}(-\Delta H)r

\frac{\partial C_{A}}{\partial t} + \bold{u}\cdot \nabla C_{A} = D\nabla^{2}C_{A} + r

where r is given by a standard arrhenius expression which couples the two transport equations.:
r = Aexp(\frac{E_{a}}{RT})C_{A}

A, E_{a} are the preexponential factor and activation energy and R is the ideal gas constant.

I intend to solve this part outside the PISO loop as the temperature and chemical species do not strongly affect flow and can be neglected. But I am not too sure how to couple these two equations within openFoam. I understand that the following implementation provides a 1 way coupling of the velocity to the temperature equation:

// --- PISO loop
while (piso.correct())
volScalarField rAU(1.0/UEqn.A());
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phiHbyA
+ fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)

adjustPhi(phiHbyA, U, p);

// Update the pressure BCs to ensure flux consistency
constrainPressure(p, U, phiHbyA, rAU);

// Non-orthogonal pressure corrector loop
while (piso.correctNonOrthogonal())
// Pressure corrector

fvScalarMatrix pEqn
fvm::laplacian(rAU, p) == fvc::div(phiHbyA)

pEqn.setReference(pRefCell, pRefValue);


if (piso.finalNonOrthogonalIter())
phi = phiHbyA - pEqn.flux();

#include "continuityErrs.H"

U = HbyA - rAU*fvc::grad(p);
// This is where we add the temperature transport equations:
fvScalarMatrix TEqn
fvm:: ddt(T)
// The phi bit is a function argument which represents a vol<Type>Field
+ fvm:: div(phi, T)
- fvm:: laplacian(alpha, T)
// We need to add the source term below here:

Thanks for your help!
pavaninguva is offline   Reply With Quote

Old   December 28, 2019, 08:28
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 611
Rep Power: 14
mAlletto will become famous soon enough
There are at least two option you can follow:

1) use a segregated approach: you first solve for T using the values of CA of the old time step and than you solve for CA using the newly computed values of T. I do not how good this will work because the equation for CA is very stiff. But this is implemented quit easily

2) Use the same method as above but apply an operator splitting method for CA: First solve the ordinary differential equation \frac{\partial Ca}{\partial t} = Aexp(\frac{E_{a}}{RT})C_{A}. Use the averaged value over the time step of CA computed by solving the differential equation to compute the reaction rate and solve the partial differential equation for CA. This method is used in the solver of openfaom involving chemical reactions like chemFoam, reactingFoam ore fireFaom.


mAlletto is offline   Reply With Quote


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
Free surface issues with interDyMFoam for hydroturbine oumnion OpenFOAM Running, Solving & CFD 0 October 6, 2017 14:05
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37
Orifice Plate with a fully developed flow - Problems with convergence jonmec OpenFOAM Running, Solving & CFD 3 July 28, 2011 05:24
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07

All times are GMT -4. The time now is 21:00.