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

Body Forces in rhoCentralFoam

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

Like Tree1Likes
  • 1 Post By dnm2017

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2018, 06:32
Default Body Forces in rhoCentralFoam
  #1
New Member
 
Join Date: Jul 2017
Posts: 2
Rep Power: 0
dnm2017 is on a distinguished road
Hi All,

I am looking to implement body forces at a source term in the rhoCentralFoam momentum calculation, to begin with just constant gravitational acceleration.

In createfields.h, I have defined:

Code:
volVectorField g
 (
     IOobject
     (
         "g",
         runTime.timeName(),
         mesh,
         IOobject::NO_READ,
         IOobject::AUTO_WRITE
     ),
     mesh,
   dimensionedVector("g", dimAcceleration, vector(0,-9.81,0))
);

volVectorField rhoG
(
    IOobject
    (
        "rhoG",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE
    ),
    thermo.rho()*g
);
Then in rhoCentralFoam.c


Code:
        // --- Solve momentum
        rhoG = rho * g; 
       //not sure if I need the above ^ ???
        solve(fvm::ddt(rhoU) + fvc::div(phiUp) - rhoG);
The output files for rhoG appears to be correct but doesn't produce the results I expect, for a cuboid box with only gravity acting, symmetry plane at the bottom (y_min) and zerogradient conditions everywhere else, initial pressure 101325pa, the pressure just continues to build up at y_min when I was expecting it to settle down.... I'm sure I'm just doing something stupid so if anyone could offer some advice that would be great.

Thanks
Dave
febriyan91 likes this.
dnm2017 is offline   Reply With Quote

Reply

Tags
body force, gravity, rhocentralfoam

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
forces on body in oscillatory flow ashkan OpenFOAM Running, Solving & CFD 1 April 13, 2018 08:15
Estimating drag and lift forces on rectangular solid body in Abaqus ismailqeshta Main CFD Forum 0 November 20, 2016 01:58
Ahmed body: questions about reference area and forces sandyy235 OpenFOAM 4 October 30, 2016 09:50
Body forces Mawosouls CFD Freelancers 1 July 22, 2016 13:13
Body Forces Thomas P. Abraham Main CFD Forum 1 April 21, 1999 22:24


All times are GMT -4. The time now is 21:28.