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

Add a source term (body force) in icoFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2016, 03:17
Default Add a source term (body force) in icoFoam
  #1
New Member
 
hisham
Join Date: Nov 2015
Location: Japan
Posts: 12
Rep Power: 10
hisham007 is on a distinguished road
Hi foamers,

Im a new OP user.

Now I create a new source term (body force) named "f" and add to the N-S equation in icoFoam solver. This f represented by using scalar potential. I want to know how can I add this f? Any expert can help me?

createFields.H
// add source term;
Info<< "Reading field f\n" << endl;
volVectorField F
(
IOobject
(
"f",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);


icoFoam-force.C
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)

);

solve(UEqn == f -fvc::grad(p)); //add source term;
hisham007 is offline   Reply With Quote

Old   January 29, 2016, 04:21
Default
  #2
New Member
 
hisham
Join Date: Nov 2015
Location: Japan
Posts: 12
Rep Power: 10
hisham007 is on a distinguished road
Hi guyz,

I've successful add body force term but the result don't appear any effect from adding this body force? Anyone can help me?
hisham007 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
Add a source term to UEqn.H KeiJun OpenFOAM Programming & Development 6 December 2, 2022 23:55
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
Problems with SUPG body force term FEM question Main CFD Forum 0 January 21, 2006 17:51


All times are GMT -4. The time now is 22:58.