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

Source term problem in UEqn of simpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2011, 10:52
Default Source term problem in UEqn of simpleFoam
  #1
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16
fisch is on a distinguished road
Hi,

i want to add a (nondependent) source term to the UEqn of my simpleFoam solver.
I tried different ways where to place the term and the problem is that it lead to two different results and i don't know what is wrong...

way a) was:
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::laplacian(nu, U)
-sourceterm
);
eqnResidual = solve
(
UEqn() == -fvc::grad(p)
).initialResidual();


way b) was:
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::laplacian(nu, U)
);
eqnResidual = solve
(
UEqn() == -fvc::grad(p) + sourceterm
).initialResidual();


Can anybody help me please? What is the difference between these two ways?
Thanks a lot,
rupert
fisch is offline   Reply With Quote

Old   June 17, 2011, 11:57
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
Can you post a complete case up? How do they differ?
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan 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
Large source term in species equation MACFD FLUENT 4 January 4, 2011 15:16
Sloshing Problem methods.. .mesh motion and Source term lostin4ever Main CFD Forum 1 December 1, 2009 02:02
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
source term in a gas mixture problem Kevin Siemens 0 March 27, 2008 06:55
Problem with source term in the calculation domain galaad OpenFOAM Running, Solving & CFD 0 November 28, 2005 10:43


All times are GMT -4. The time now is 13:36.