CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

How should I implement this scalar transport equation

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 14, 2014, 09:38
Default How should I implement this scalar transport equation
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 742
Rep Power: 9
sharonyue is on a distinguished road
Hi guys,

I wanna solve this equation:
\frac{{\partial j}}{{\partial t}} + \nabla  \cdot \left( {jU} \right) = {C_1} \cdot f\left( \varepsilon  \right) \cdot j - {C_2} \cdot \varphi \left( \varepsilon  \right) \cdot {j^{\frac{{11}}{9}}}

I code it like this:
Code:
    fvScalarMatrix nEqn
    (
	    fvm::ddt(j)   
       +   fvm::div(phi1,j)
           ==
	   C1*j* epsilon
	  -fvm::Sp(C2*pow(j, 2.0/9.0)* epsilon, j)
    );
But it's result is wired. Thanks in advance.

Last edited by sharonyue; April 14, 2014 at 21:55.
sharonyue is offline   Reply With Quote

Old   April 14, 2014, 21:32
Default
  #2
Member
 
xuhe-openfoam
Join Date: Aug 2013
Location: DaLian,china
Posts: 82
Rep Power: 5
bieshuxuhe is on a distinguished road
hello!

maybe you could give more information , for example:
C1>0 or C1<0, epsilon?
bieshuxuhe is offline   Reply With Quote

Old   April 14, 2014, 21:37
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 742
Rep Power: 9
sharonyue is on a distinguished road
Quote:
Originally Posted by bieshuxuhe View Post
hello!

maybe you could give more information , for example:
C1>0 or C1<0, epsilon?
C1, C2, epsilon is all positive~ can I deal with this with some sophisticated approach?
sharonyue is offline   Reply With Quote

Old   April 14, 2014, 22:53
Default
  #4
Member
 
xuhe-openfoam
Join Date: Aug 2013
Location: DaLian,china
Posts: 82
Rep Power: 5
bieshuxuhe is on a distinguished road
I suppose that :
1 "j+jSmall" is "j"
2 there is no limit of the value of "j"

then , modify the source term " -C2*pow((j+jSmall),11.0/9.0)* epsilon " to :
Code:
- 11.0/9.0*C2*fvm::Sp(epsilon,j) 
+ 2.0/9.0*C2*epsilon*pow(j,11.0/9.0)
maybe this will be fine!
of cource maybe there is some other reason for wired result, not only the discretization of source term.
bieshuxuhe is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make a scalar transport equation to be conserved? immortality OpenFOAM Programming & Development 3 May 5, 2013 08:11
Transport Equation for a scalar - Compressible Solver alessio.nz OpenFOAM Programming & Development 5 April 11, 2013 09:04
new scalar transport eqn. with new density Tobi OpenFOAM Programming & Development 0 September 3, 2012 08:18
Implement species transport equation Tobi OpenFOAM Programming & Development 0 June 2, 2012 13:26
how solve a scalar equation with Fluent tomik FLUENT 0 January 5, 2006 07:38


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