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

how to implement this kind of equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2009, 10:19
Default how to implement this kind of equation
  #1
New Member
 
mihamina keisha
Join Date: May 2009
Location: india
Posts: 19
Rep Power: 16
keishawillstone is on a distinguished road
hi there!
I'm modeling a combustion problem(2D problem) and I have trouble
implementing this equation:
(vs rhoapp Cps)d/dx(Ts)-laplacian(lambda,Ts) = S;
where d/dx stands for derivative with respect to x
vs stands for the velocity of the household refuse entering the
incinerator (dimensionedVector)
rhoapp is a volScalarfield (density)
Cps is the heat capacity
S is a source term
Here is what I tried:
solve
(
-fvm::laplacian(lambdaeff,Ts)+fvm::div(rhoappvsCp, Ts) ==S
);
coupled with the gas mixture temperature (in order to take into account the convective transfer included in the source term of both equations) which is:

solve(fvm::div(phi,T) == SS);

rhoappvsCp is surfaceScalarField
it starts well but it crashes after.
I thought it was due to the boundary condition in the
beginning(conservative flux)
but when I turned it into a transient problem which gave:
solve
(
-fvm::laplacian(lambdaeff,Ts)+fvm::ddt(rhoappvsCp, Ts)

== S

);
solve
(
fvm::ddt(rhoCpporo, T)+fvm::div(phi,T) == SS
);
it's ok,it ran well and gave an accurate solution!
Then I ended up thinking that the problem was due to the
implementation of this term
""(vs rhoapp Cps)d/dx(Ts)""
So I tried to do something else like this:
solve
(
-fvm::laplacian(lambdaeff,Ts)+rhoappvsCp*(myvector &
fvc::grad(Ts)) == S

);
Because I thought that it was a gradient term but the y component
should be eliminated then I created a vector
myvector (1 0 0),and with the inner product the y component is
omitted!
it still crashed!!!!
in the source code I also have to implement the density equation which
is:
d/dx(vs rhoapp) = S
and I went on with the elimination of the y-component:
mag(vs)*(myvector & fvc::grad(rhoapp)) == Srhoapp
but it sends an error message!!!before,I took it as divergence term
using
fvm::div(svs,rhoapp) = Srhoapp
svs is a surfaceScalarField and it runs well but I don't think that it is a
divergence term!!!
So my question is how to implement this kind of equation
"(vs rhoapp Cps)d/dx(Ts)" and this "d/dx(vs rhoapp)" DIVERGENCE OR GRADIENT WITH Y-COMPONENT ELIMINATED??
I'M QUITE STUCK!!!
Please can somebody help me out?
Best Regards
keishawillstone is offline   Reply With Quote

Old   August 11, 2009, 02:09
Default
  #2
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
Dear Mihamina,

when you drop the ddt-term from the standard transport equation, the resulting linear system becomes unsuitable for the linear solvers that are commonly used in CFD. Therefor you MUST underrelax the equation. Did you and did it have an effect, that is change the number of iterations?

You don't need special treatment for 2D cases on the top level. My bet is that you can safely throw that in the bin.

Henrik







henrik is offline   Reply With Quote

Old   August 11, 2009, 06:01
Default
  #3
New Member
 
mihamina keisha
Join Date: May 2009
Location: india
Posts: 19
Rep Power: 16
keishawillstone is on a distinguished road
Hi Henrik,
I will follow your advice by underrelaxing it because I didn't think about it!!
Thanks a lot
keishawillstone 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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
how to implement this kind of source term keishawillstone OpenFOAM Programming & Development 8 July 24, 2009 14:14
continuity equation Rafal Main CFD Forum 4 November 29, 2006 09:27
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 12:02
Diffusion Equation izardy amiruddin Main CFD Forum 2 July 4, 2002 08:14


All times are GMT -4. The time now is 02:17.