|
[Sponsors] |
February 21, 2020, 20:40 |
Specific Humidity Equation and FvOptions
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi all,
I am solving the specific humidity in my humidity thermodynamic library. Since a few weeks, I added the functionality to add source/sinks using the fvOptions capabilities. However, I do have some problem here. Consider the equation: which I implemented as: Code:
fvScalarMatrix specHumEqn ( fvm::ddt(rho, specHum) + fvm::div(phi, specHum) == fvm::laplacian(muEff, specHum) + fvOptions(rho, specHum) ); specHumEqn.relax(); fvOptions.constrain(specHumEqn); specHumEqn.solve(); fvOptions.correct(specHum); Code:
sourceHumidity { type scalarSemiImplicitSource; timeStart 0; duration 5.0; selectionMode all; cellZone zone; volumeMode absolute; injectionRateSuSp { thermo:specificHumidity (1 0); } } If I program it like that, it works: Code:
fvScalarMatrix specHumEqn ( fvm::ddt(rho, specHum) + fvm::div(phi, specHum) == fvm::laplacian(muEff, specHum) + rho*dimensionedScalar("non", dimensionSet(0,0,-1,0,0,0,0), 1) ); specHumEqn.relax(); fvOptions.constrain(specHumEqn); specHumEqn.solve(); fvOptions.correct(specHum);
__________________
Keep foaming, Tobias Holzmann |
|
February 21, 2020, 21:04 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Ah I found the problem but now I am a bit lost:
The explicit source is added to the equation but without the density information Code:
eqn += Su + fvm::SuSp(Sp, psi); Tobi
__________________
Keep foaming, Tobias Holzmann |
|
February 21, 2020, 21:30 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Yes we do have the bug here and I asked a similar question a few weeks ago while we pointed out that there is a problem. Using density based solvers, we do neglect the density in this function (addSup). I am checking it with the people from the Foundation and will report / provide a patch.
__________________
Keep foaming, Tobias Holzmann |
|
February 22, 2020, 07:14 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi all,
I already discussed a few thing here. As some quantities do not need the multiplication by the density it is not a bug per se. However, one should keep this in his mind. Maybe a workaround will be started to explicitly activate the density multiplication. Well, I keep you up to date. Alternatively, one can use the coded... fvOptions functionality and do the multiplication manually.
__________________
Keep foaming, Tobias Holzmann |
|
March 10, 2021, 09:58 |
|
#5 |
New Member
rocco
Join Date: Nov 2020
Posts: 13
Rep Power: 5 |
Hi,
I am also trying to add the humidity equation to interCondensatingEvaporatingFoam to study an open flat channel formed by water and air. My problem is that I cannot make the specific humidity dependent on the saturation temperature. Do you have any advice? Best regards, Rocco |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can I use fvOptions to couple a solid region and a fluid region? | titanchao | OpenFOAM Running, Solving & CFD | 4 | January 14, 2022 07:55 |
fvMatrix, fvOptions and SuSp: automatic implicit/explicit source-term treatment | Zeppo | OpenFOAM Programming & Development | 7 | December 15, 2021 10:20 |
Porosity and the energy equation | shock77 | OpenFOAM Running, Solving & CFD | 11 | May 9, 2020 15:52 |
reactingFOAM with fvOptions for gravity ERROR in energy equation | er99 | OpenFOAM Running, Solving & CFD | 1 | June 3, 2019 11:08 |
Power dependent heat source using fvOptions | Raza Javed | OpenFOAM Running, Solving & CFD | 0 | April 15, 2019 08:45 |