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

Adding a momentum source term

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

Like Tree2Likes
  • 1 Post By henry
  • 1 Post By henry

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2005, 13:43
Default Hi, I'm trying to model air f
  #1
Member
 
David Segersson
Join Date: Mar 2009
Posts: 39
Rep Power: 17
segersson is on a distinguished road
Hi,
I'm trying to model air flow through vegetation and need to add a negative source term to the momentum equation in simpleFoam. I would appreciate some advice to get this right (I'm quite new to OpenFOAM...).

For the different directions the source term is:
Sx = -0.5*rho*Cd*abs(u)*u
Sy = -0.5*rho*Cd*abs(v)*v
Sz = ...
,where Cd is a constant.

My questions are:
1. After I have created a volScalarField for Cd, how can I express the term in OpenFOAM in a nice way?
( S = -0.5*rho*Cd*U&U gives me the wrong sign I guess...)

3. Is it correct to insert the source term in simpleFoam.C as:

solve(UEqn() == S -fvc::grad(p));

Do I have to include the source term anywhere else in the SIMPLE algorithm?

3. If I want the term to be explicit, are there any advantage in using the SuSp(..,..) function?

Regards
David
segersson is offline   Reply With Quote

Old   May 19, 2005, 13:53
Default Basically you are adding a dra
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Basically you are adding a drag term in which case you should make it implicit using fvm::Sp. Is the drag coefficient a scalar or should it be tensorial to take into account anisotropy? If scalar I think your source term should be

-fvm::Sp(0.5*rho*Cd*mag(U), U)

and remember to include it in the momentum equation construction not in

solve(UEqn() == S -fvc::grad(p));

otherwise the pressure equation will not "see" the drag term at all.
utkunun likes this.
henry is offline   Reply With Quote

Old   May 20, 2005, 12:17
Default hi, I added the energy equati
  #3
chafi_fatima_zohra
Guest
 
Posts: n/a
hi,
I added the energy equation in icoFoam, this equation depends, obviously, the rates of flow: u, v and w. my questions are:

1- how to add a source term in the momentum equation only in z direction?

2- this source term does not depend on velocity but it depends on the temperature: g*beta*(T-Tref) (approximation of Boussinesq), icoFoam can it solve equation(equation of movement coupled with the equation of energy)?

thank you in advance for your assistance

zohra
  Reply With Quote

Old   May 20, 2005, 12:31
Default Create g as a dimensionedVecto
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Create g as a dimensionedVector then g*beta*(T-Tref) will be a volVectorField containing components only in the g-direction and this can be added as a source term to the momentum equation.

You will have to think carefully about the pressure boundary conditions because zero-gradient on walls will no longer be appropriate. Alternatively you can use the approach in the buoyant-flow codes I have already written in which a "dynamic-pressure" pd is used which is p - rho*(g&h) which avoids some of the issues to do with the pressure boundary conditions as well as potential solution staggering that can occur on collocated meshes.
meth likes this.
henry is offline   Reply With Quote

Old   May 20, 2005, 14:23
Default hi, I will apply what you h
  #5
chafi_fatima_zohra
Guest
 
Posts: n/a
hi,

I will apply what you have suggest me.

thank you
  Reply With Quote

Old   March 3, 2006, 00:06
Default Dear chafi fatima zohra: I
  #6
Senior Member
 
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 17
liugx212 is on a distinguished road
Dear chafi fatima zohra:

I have the same question about how to add the source term in cavity case of icoFoam. Could you please give some advice please?

Thanks a lot.

Best wishes,
Guoxiang
liugx212 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding source term to u eq roberthino OpenFOAM Running, Solving & CFD 26 June 3, 2022 08:27
Adding a volumetric source term in femlab BS COMSOL 1 December 28, 2006 21:26
Question on adding source to momentum CFDtoy Main CFD Forum 0 May 2, 2006 12:51
Adding a source term to continuity eqn(UDF) Sebeci FLUENT 0 April 20, 2003 04:12
adding source term confusion tedmcc CFX 4 September 27, 2001 06:05


All times are GMT -4. The time now is 11:34.