CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to solver coupled transport equations

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

Like Tree2Likes
  • 2 Post By mprinkey

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2006, 13:31
Default I want to solve 2 scalar trans
  #1
Member
 
chris book
Join Date: Mar 2009
Posts: 85
Rep Power: 17
chris1980 is on a distinguished road
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?
chris1980 is offline   Reply With Quote

Old   June 29, 2006, 19:46
Default What is the nature of the coup
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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.

Mike
mprinkey is offline   Reply With Quote

Old   June 30, 2006, 05:28
Default it is more a general question
  #3
Member
 
chris book
Join Date: Mar 2009
Posts: 85
Rep Power: 17
chris1980 is on a distinguished road
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?
chris1980 is offline   Reply With Quote

Old   June 30, 2006, 07:09
Default OpenFOAM currently only handle
  #4
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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:

while (UNCONVERGED)
{
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.

Mike
elham-u and Lann like this.
mprinkey is offline   Reply With Quote

Old   August 18, 2006, 07:24
Default It there somewhere a example h
  #5
Member
 
chris book
Join Date: Mar 2009
Posts: 85
Rep Power: 17
chris1980 is on a distinguished road
It there somewhere a example how to solve couled equations (not p-U coupling) in OpenFOAM?
chris1980 is offline   Reply With Quote

Old   August 25, 2006, 08:49
Default Can someone push me into to di
  #6
Member
 
chris book
Join Date: Mar 2009
Posts: 85
Rep Power: 17
chris1980 is on a distinguished road
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.
chris1980 is offline   Reply With Quote

Old   August 25, 2006, 09:05
Default Chris, I answered your ques
  #7
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Chris,

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.


Mike
mprinkey is offline   Reply With Quote

Old   August 25, 2006, 09:18
Default Yes you are right Mike, I was
  #8
Member
 
chris book
Join Date: Mar 2009
Posts: 85
Rep Power: 17
chris1980 is on a distinguished road
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.
chris1980 is offline   Reply With Quote

Old   October 29, 2019, 08:15
Default I am dealing with such a problem!!!
  #9
New Member
 
Jones_CFD
Join Date: Jun 2019
Posts: 2
Rep Power: 0
Younes_Tatari is on a distinguished road
Hi

I want to simulate the motion of three species (electron, positive and negative ions). Each species has its transport equation and all of them are affecting each other in source terms. Besides that density of each species affect the electric field (which is the driving force for each of them). these are the equations.

(∂n_e)/∂t+∇.(-μ_e E ⃗n_e-D_e ∇n_e)=S_e
(∂n_p)/∂t+∇.(-μ_p E ⃗n_p-D_p ∇n_p)=S_p
(∂n_n)/∂t+∇.(-μ_n E ⃗n_n-D_n ∇n_n)=S_n

∇^2 V= -(e(n_p-n_e-n_n))/ε
E ⃗= - ∇V

the fourth equation is Poisson equation which connects the electric field to the species.

I tried the mike's way. to freeze one scalar and calculate the other one!!!
unfortunately it didn't work. I mean my result isn't similar to papers. (by the way, I am not very experienced in openfoam. maybe I am miking mistake somewhere else).

I build a simple test case ( 2 planes). using structured and unstructured mesh leads to 2 totally different results. So, I think non-orthogonality plays an important role here. indicating that all these scalars should be coupled with each other and we need to correct them in a loop like PISO.
I tried a basic for loop and do while loop. (again, freezing all scalars and solving for one scalar). this loop didn't change result.

I am still struggling with this problem. if anyone has any idea I would be very happy to hear!!!
Attached Images
File Type: png Capture.PNG (8.8 KB, 20 views)
Younes_Tatari is offline   Reply With Quote

Reply

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
How to add transport equations alimansouri OpenFOAM Running, Solving & CFD 6 January 12, 2009 17:20
How to solve coupled transport equations nandiganavishal OpenFOAM Running, Solving & CFD 4 November 22, 2008 17:43
Solve Coupled Equations nandiganavishal OpenFOAM Running, Solving & CFD 1 November 12, 2008 23:47
Coupled equations solution litonx OpenFOAM Running, Solving & CFD 7 February 14, 2007 19:31
Coupled mass and heat transport yves OpenFOAM Running, Solving & CFD 1 May 5, 2006 06:33


All times are GMT -4. The time now is 03:59.