|
[Sponsors] |
March 13, 2024, 11:45 |
source term units in icoFoam
|
#1 |
Member
Divyaprakash
Join Date: Jun 2014
Posts: 71
Rep Power: 12 |
I have added a source term (body force), F, in openfoam icofoam solver.
Code:
// Momentum predictor fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) + F ); Does that mean that the force I need to add to the source should be divided by the volume and the density. However density isn't mentioned in the icoFoam solver. I think I have stumbled upon something trivial which I am unable to understand. Please guide me. |
|
March 14, 2024, 05:12 |
|
#2 |
New Member
Join Date: Nov 2017
Posts: 6
Rep Power: 9 |
That's an interesting question.
The body force in the momentum equation is an intensive quantity, so it is always devided by the volume. If your F is a gravity like force, then you just need to put the acceleration. If the force applied on your flow is expressed in Newton, then you need to divide by the total volume of your domain (which is closed volume I suppose), and divide by the density which you fix according to your physical problem. Of course density is constant in all your domain. It's true that icoFoam doesn't mention the density as it solves the incompressible form of the mementum equation, but you should be aware of it if you try to simulate a dimentioned physical problem. Keep in mind that the p in icoFoam a specific pressure (pressure/density) and you always need to know the density if you want to get dimentioned quantities during post-processing. |
|
March 14, 2024, 05:46 |
|
#3 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 735
Rep Power: 14 |
In the incompressible solvers, like icoFoam, the momentum equation is divided through by (the constant) density ... and so pressure is kinematic and has units of (Pa)/(kg/m3) = (kg/m.s2)/(kg/m3) = (m2/s2), and the flux phi is a volume flux rather than a mass flux. You can see this from the file headers in the 0 time folder of an icoFoam case ... check the dimensions. The pressure gradient term therefore has dimensions m/s2, as you point out.
Now turn to the discretised momentum equation - remember that this is integrated over each cell, and so each term in the discretised incompressible momentum equation has dimensions of m4/s. You can visualise this as Q.U where Q is the volume flow rate and U is the velocity added to that flow rate (ordinarily this would be mdot.U, for non-incompressible solvers). Coming back to your question, with your approach and icoFoam, yes your source needs to be kinematic, ie divide through by density as per chemak's reply. No, you don't need to divide through by the cell volume ... although if you are applying a force spread over a number of cells, then it makes sense to calculate the specific value and then calculate the value for each cell based on its volume. |
|
Tags |
density, icofoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MapFields utility for staggered grid | saeed jamshidi | OpenFOAM Running, Solving & CFD | 17 | January 23, 2024 12:36 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 18:34 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
UDF Source Term Units? | Brian | FLUENT | 1 | October 24, 2005 10:15 |