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

How to discretize a volumic body force ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2022, 07:27
Default How to discretize a volumic body force ?
  #1
Member
 
Join Date: Jun 2019
Posts: 41
Rep Power: 6
Voulet is on a distinguished road
Let's say I've my momentum equation with a volumic body force f:

\nabla \cdot\left(\vec{u}\otimes\vec{u}\right) - \nabla\cdot\left(\nu\nabla\vec{u}\right) = - \nabla p + f

It's well know that one have to integer it over the volume in oder to discretize it thus the last term become for a specic cell c :

\int_\Omega f ~d\Omega \implies f_c V_c

My question is the following. Does this volumic body force have to be multiplied by the volume of the cell when setting it in the momentum equation or is it automaticaly done by OF ?


Do I have to write this :

Code:
tmp<fvVectorMatrix> tUEqn
(
    fvm::div(phi, U)
  + MRF.DDt(U)
  + turbulence->divDevReff(U)
 ==
    my_own_custom_body_force
);
or this ?
Code:
tmp<fvVectorMatrix> tUEqn
(
    fvm::div(phi, U)
  + MRF.DDt(U)
  + turbulence->divDevReff(U)
 ==
    my_own_custom_body_force*V
 );
Thanks a lot.
__________________
« Debugging is what CFD is about. 5 minutes to modify your code, 5 months to find why it does not work anymore. »
Voulet 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
Ahmed Body Validation Study – Autodesk CFD Nik CFD Autodesk Simulation CFD 3 February 12, 2021 04:29
Addition of body force as function of position in icoFoam solver. FluidFox OpenFOAM Running, Solving & CFD 1 September 4, 2020 04:18
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 10 September 14, 2018 11:12
CompressibleInterDyMFoam with 6DOF body External Force im_lenny OpenFOAM Programming & Development 0 January 30, 2017 11:38
how to include body force in cfx selvam R.P CFX 4 November 25, 2005 04:01


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