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

Adding volumetric body force term to compressibleInterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2016, 14:05
Default Adding volumetric body force term to compressibleInterFoam
  #1
New Member
 
Ali Charchi
Join Date: Oct 2013
Location: South Carolina, USA
Posts: 8
Rep Power: 12
alicharchi is on a distinguished road
I would like to add a volumetric body force term (F) to compressibleInterFoam. Is it done by just adding F to UEqn in UEqn.H file? Like this:

Code:
    fvVectorMatrix UEqn
    (
        fvm::ddt(rho, U)
      + fvm::div(rhoPhi, U)
      + turbulence->divDevRhoReff(U)
      - F
    );

    UEqn.relax();

    if (pimple.momentumPredictor())
    {
        solve
        (
            UEqn
         ==
            fvc::reconstruct
            (
                (
                    interface.surfaceTensionForce()
                  - ghf*fvc::snGrad(rho)
                  - fvc::snGrad(p_rgh)
                ) * mesh.magSf()
            )
        );

        K = 0.5*magSqr(U);
    }
alicharchi is offline   Reply With Quote

Old   March 4, 2016, 14:07
Default
  #2
New Member
 
Ali Charchi
Join Date: Oct 2013
Location: South Carolina, USA
Posts: 8
Rep Power: 12
alicharchi is on a distinguished road
Of course, I have already defined and calculated F. The issue is just including it in momentum equation.
alicharchi is offline   Reply With Quote


Old   April 18, 2016, 11:40
Default
  #4
New Member
 
Ali Charchi
Join Date: Oct 2013
Location: South Carolina, USA
Posts: 8
Rep Power: 12
alicharchi is on a distinguished road
Thanks pascal! It helped me very much!
alicharchi is offline   Reply With Quote

Reply

Tags
compressibleinterfoam, volumetric body force


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
UDF for defining a body force in Singel ROtating Reference Frame teymourj Fluent UDF and Scheme Programming 9 August 18, 2016 15:33
force and rigid body armin najarian CFX 1 August 20, 2015 13:46
how to add body force by udf? wolfish Fluent UDF and Scheme Programming 0 March 28, 2012 09:52
body force term Goutam OpenFOAM Programming & Development 0 February 1, 2012 09:13
SIMPLE force term isnbt converging what have I missed brooksmoses OpenFOAM Running, Solving & CFD 2 July 17, 2006 20:25


All times are GMT -4. The time now is 06:44.