|
[Sponsors] |
How to add a source term (body force) to icoFoam? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 6, 2010, 01:46 |
How to add a source term (body force) to icoFoam?
|
#1 |
New Member
刘会星
Join Date: Nov 2010
Posts: 4
Rep Power: 15 |
Hi, foamers:
I am a new OpenFOAM user, and i want to add a source term (body force) to icoFoam. I creat a new field named "F" and add F to the N-S equation. After complie, i test it in the lid-driven-cavity example, and use the force on the lid to drive the fluid instead of the lid velocity. However, the fluid stay still and the force fill the cavity.(I want the force on the lid only and the fluid is driven.) Any suggestions will be appreciated! Best regards! chris Liu 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; Detailed source file in the attachment. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add a source term to simpleFoam | markc | OpenFOAM | 9 | September 10, 2009 10:55 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
Problems with SUPG body force term | FEM question | Main CFD Forum | 0 | January 21, 2006 17:51 |