|
[Sponsors] |
interFoam and scalarTransport function object with fvOptions sources |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 12, 2017, 07:08 |
interFoam and scalarTransport function object with fvOptions sources
|
#1 |
Member
Join Date: Nov 2009
Posts: 56
Rep Power: 17 |
Hello all,
I am trying to simulate a passive scalar transport in a water-air two phase incompressible model with OpenFOAM-dev. I am using the scalarTransport function object, the scalarField name is "s". I have added the 0/s file with appropriate boundary conditions and as such the function object operates as expected. I would like to add scalar sources within my domain and therefore I have defined a scalarSemiImplicitSource fvOption source where I am only using the explicit term of the source. My problem is that OpenFOAM tells me that my source is defined but never used. Code:
From function virtual void Foam::fv::option::checkApplied() const in file cfdTools/general/fvOptions/fvOption.C at line 125 Source s defined for field s but never used This is my fvOptions subdict Code:
fvOptions { s { type scalarSemiImplicitSource; timeStart 0; duration 100; selectionMode points; points ( (0 25 0) ); volumeMode absolute; injectionRateSuSp { s (1000 0); // kg/s } } } |
|
June 12, 2017, 08:31 |
|
#2 |
Member
Join Date: Nov 2009
Posts: 56
Rep Power: 17 |
I got everything working by including everything within the controlDict under functions
Code:
functions { s { type scalarTransport; libs ("libsolverFunctionObjects.so"); resetOnStartUp no; field s; fvOptions { s { type scalarSemiImplicitSource; timeStart 0; duration 100; active true; selectionMode points; points ( (0 25 0) ); volumeMode absolute; injectionRateSuSp { s (1000 0); // kg/s } } } |
|
January 13, 2019, 11:28 |
|
#3 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
May I know if you manage to find the way out for the movement of the scalar between phases? I encounter the similar problem, but in interMixingFoam.
|
|
June 16, 2020, 15:53 |
|
#4 |
Member
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 10 |
Sorry for the bump, but did anyone figure out the solution to this?
I encountered this when I created a scalar transport in interfoam solver, by looking at the implementation of corresponding functionObject, but encountered the same issue. I thought it had to do with something I did mistakenly but now it seems even the functionObject based implementation suffers from this - scalar escapes into the other phase. |
|
April 18, 2022, 08:12 |
|
#5 | |
Senior Member
Join Date: Mar 2010
Posts: 181
Rep Power: 17 |
For anyone looking for this answer:
You can add the following to your controlDict configuration for scalarTransport Function Object to confine to one or other of the fields in a multiphase simulation. Quote:
|
||
|
|