Scalar Transport Equation with a source term using functionObjects and fvOptions
Hey all;
I want to run simpleFoam on a simple converging pipe (laminar and Newtonian) and at the same time add a scalar transport equation with a constant source term in the controlDict. Note that the scalar transport field is called D (which I set to be dimensionless), with zero diffusion (so it is a pure convection problem), and the source term is intended to be applied at the entire domain (all the cells generate the same constant source value). Also note that for future steps, I need to have a source term which is a function of another field variable (say for example source = sqrt(U)/3 at each cell), but for now I need to start with a simple case of a constant source to get things started. Here is my function object section along with the fvOption in my controlDict: Code:
Code:
dimensions [0 0 0 0 0 0 0]; Selecting finite volume options type scalarFixedValueConstraint Source: fixedSource - selecting all cells - selected 60152 cell(s) with volume 2.174888003341e-06 When simulation is complete, I get a D file in each time folder, which is basically the same as the D file in 0 folder, except that Code:
internalField uniform 1; But then, I get another file called phi in each time folder, which is a surfaceScalarField with the unit of [0 3 -1 0 0 0 0], which I don't know anything about. Can anyone help me find out what this phi is? Also, what steps should I take to have a more complicated source term (e.g. that is a function of a field variable)? Thanks |
Ok, I have made some progress on applying a coded type source term to my scalar transport equation through fvOptions in controlDict.
For example, below I added a source term to my scalar transport eqn which is in the form of a constant value times magnitude of velocity and it complies just fine. Code:
functions Anyone here to help? |
For those interested in a solution, follow the discussion here:
https://www.cfd-online.com/Forums/op...tml#post798262 |
All times are GMT -4. The time now is 11:50. |