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

How to transform the transport equation like this in OpenFOAM?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 12, 2022, 03:44
Default How to transform the transport equation like this in OpenFOAM?
  #1
New Member
 
Jianfeng
Join Date: Apr 2021
Posts: 11
Rep Power: 5
jennyjian is on a distinguished road
Hi guys!
I am working on a scalar transport equation in OpenFOAM, which is a little bit complex to make it converge. The equation is attached in the attachment equation 1:


where alpha, Df, Db, Hb have constant values in the whole fluid domain, while pO2 is the unknown oxygen partial pressure and SO2 is a function of pO2.

Firstly, without any treatment, the terms with Hb SO2 are treated as source terms:
The code is
fvm::div(phi,pO2) - fvm::laplacian(Df,pO2) ==
- fvc::SuSp(Hb/alpha*fvc::div(phi,SO2)/pO2,pO2)
+ fvc::Su(1/alpha*fvc::laplacian(Db,SO2))

Since the term Hb/alpha*fvc::div(phi,SO2) is about 7 times the value of div(phi,pO2). This solver diverges very quickly.

Later to solve this, I try to transform the term fvc::div(phi, SO2)
div(u) = 0 when the fluid equation converges. (incompressible)
The equation is listed in the attachment (equation2)
The code is
fvm::div(phi,pO2)-1.0/(1+Hb/alpha*inter1)*fvm::laplacian(Df,pO2)
==
1.0/(1+Hb/alpha*inter1)*fvc::laplacian(Drbc*Hb/alpha,SO2)
inter1 is grad(SO2)/grad(PO2)

To verify this solver, I use the steady flow across the cylinder Re = 5 as a case, where pO2 at the surface of the cylinder is 760 mmHg, and the inflow is 56mmHg.
However, the result (in attachment result and the correct result in literature Re5_full) seems the scalar pO2 is transported to only the first layer meshes near the boundary, which is a sign of convection only, without the diffusion. I wonder if the term 1.0/(1+Hb/alpha*inter1) can't be written outside the fvm::laplacian, is there any idea or suggestion on how to write this equation in OpenFOAM?

Thanks a lot!
Attached Images
File Type: png equation2.png (12.7 KB, 22 views)
File Type: png equation1.png (16.4 KB, 18 views)
File Type: jpg result.jpg (19.2 KB, 14 views)
File Type: jpg Re5_full.jpg (18.7 KB, 13 views)

Last edited by jennyjian; February 15, 2022 at 15:10.
jennyjian is offline   Reply With Quote

Old   February 15, 2022, 15:13
Default
  #2
New Member
 
Jianfeng
Join Date: Apr 2021
Posts: 11
Rep Power: 5
jennyjian is on a distinguished road
The first figure is uploaded again
Attached Images
File Type: png eqn3.PNG (11.7 KB, 14 views)
jennyjian is offline   Reply With Quote

Reply

Tags
equation definition


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
Setting the height of the stream in the free channel kevinmccartin CFX 12 October 13, 2022 22:43
Different ways to treat source terms of an additional transport equation in OpenFOAM adib_mohammad OpenFOAM Running, Solving & CFD 14 January 6, 2022 06:18
How can temperature e treated as a passive scalar be used in transport equation? granzer OpenFOAM Running, Solving & CFD 3 June 6, 2021 17:35
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19


All times are GMT -4. The time now is 14:39.