|
[Sponsors] |
|
February 5, 2022, 12:45 |
Add mass source term to simpleFoam
|
#1 |
New Member
Join Date: Dec 2021
Posts: 23
Rep Power: 4 |
Hello,
I would like to add a mass source term to simpleFOAM but do not know how to do it. Can I just create a field called mass term: Code:
volScalarField massSource ( IOobject ( "massSource", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Code:
fvScalarMatrix pEqn ( fvm::laplacian(rAtU(), p) == fvc::div(phiHbyA) - massSource ); I was going to set the values of massSource from `setExprFields`. Is this the correct procedure? Does the momentum equation need to changed? Last edited by MamboJambo; February 6, 2022 at 14:40. |
|
May 10, 2023, 04:56 |
|
#2 |
New Member
DuanYabo
Join Date: Jul 2022
Posts: 16
Rep Power: 3 |
Hello, I encountered the same problem as you, and I corrected it in the same way as you, but the program reported an error. Have you solved it now?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add Source term (2) for PYROLYSIS - reactingOneDim | Kummi | OpenFOAM | 10 | April 12, 2021 21:11 |
Add a mass source/sink to simpleFoam | palarcon | OpenFOAM Programming & Development | 4 | May 15, 2019 02:33 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 11:32 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 01:41 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 11:44 |