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

Anyone know how to apply such equation in solver?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2020, 21:34
Default Anyone know how to apply such equation in solver?
  #1
New Member
 
Zhanyuan Wang
Join Date: Sep 2018
Location: China
Posts: 9
Rep Power: 8
Zhanyuan Wang is on a distinguished road
The equation is shown in attached picture, which is a transport equation solving mass fraction Y, and alphal is liquid phase fraction defined in VOF solvers. Problem is that there are always many cells where 1 - alpha1 = 0, so if i simply write equation like:
(1 - alphal)*fvm::ddt(rhovg, Y) + (1 - alphal)*fvm:rhophi, Y).....
solver will break at the first time step because the value of (1 - alphal) is somewhere zero.
Anyone know how to write the right equation? I will be VERY appreciated for any help offered
Attached Images
File Type: png 20200107103206.png (20.5 KB, 26 views)
File Type: jpg d2d491a434d1b7fc37ba106b597e25e.jpg (81.5 KB, 18 views)

Last edited by Zhanyuan Wang; January 7, 2020 at 04:20.
Zhanyuan Wang is offline   Reply With Quote

Old   January 7, 2020, 03:10
Default
  #2
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
what if you divide your equation by (1-alphal) and that you have m/(1-alphal+SMALL) instead?
Cyp is offline   Reply With Quote

Old   January 7, 2020, 04:18
Default
  #3
New Member
 
Zhanyuan Wang
Join Date: Sep 2018
Location: China
Posts: 9
Rep Power: 8
Zhanyuan Wang is on a distinguished road
Thank you Cyprien!

I changed (1 - alphal) to (1 - alphal + SMALL) and then the solver will not break down, but regretfully i also didn't get the result i want.
This equation aims to solver Y only in regions where alphal = 0, but result showed Y was still solved in regions where alphal = 1 and its value was unnormally big. I add a picture in my thread and you can see the result here. A droplet was put in the calculating area where alphal = 1 inside the droplet.
So could you give me any suggestion on how to achieve my goal? Sorry to bother you so much time, but I m truly desperate for help...
BTW, The equation can be find in following article, where the writter applied such equation in OpenFoam.

http://scihub.bban.top/10.1615/atomizspr.2019027077
Zhanyuan Wang is offline   Reply With Quote

Old   January 7, 2020, 04:28
Default
  #4
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Why not using the Continuous Species Transfer formulation instead? It is fully compatible with the VOF approach (single-field equations instead of two-fields equations)


https://www.sciencedirect.com/scienc...21999119307302
Cyp is offline   Reply With Quote

Old   January 7, 2020, 06:57
Default
  #5
New Member
 
Zhanyuan Wang
Join Date: Sep 2018
Location: China
Posts: 9
Rep Power: 8
Zhanyuan Wang is on a distinguished road
Thank you Cyprien for your kind advise!
I will read this article and hope it can help me solve my problem!
Zhanyuan Wang is offline   Reply With Quote

Old   February 16, 2022, 12:06
Default
  #6
New Member
 
Join Date: Oct 2010
Posts: 23
Rep Power: 15
clarkent is on a distinguished road
Quote:
Originally Posted by Zhanyuan Wang View Post
The equation is shown in attached picture, which is a transport equation solving mass fraction Y, and alphal is liquid phase fraction defined in VOF solvers. Problem is that there are always many cells where 1 - alpha1 = 0, so if i simply write equation like:
(1 - alphal)*fvm::ddt(rhovg, Y) + (1 - alphal)*fvm:rhophi, Y).....
solver will break at the first time step because the value of (1 - alphal) is somewhere zero.
Anyone know how to write the right equation? I will be VERY appreciated for any help offered

Hi Zhanyuan,


Have you found a solution to your problem?
clarkent is offline   Reply With Quote

Reply


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 21:43
Poisson equation in custom solver diverges for large boundary values babakflame OpenFOAM Running, Solving & CFD 2 May 23, 2017 20:11
Add Work due to body force in the energy equation for a lagrangian solver mneben OpenFOAM Programming & Development 6 January 19, 2016 05:30
Transport Equation for a scalar - Compressible Solver alessio.nz OpenFOAM Programming & Development 5 April 11, 2013 09:04
How to apply KINETIC rate equation on walls SEEMI FLUENT 0 August 28, 2008 08:07


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