CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Setting scalar fields in sprayFoam (https://www.cfd-online.com/Forums/openfoam-solving/106225-setting-scalar-fields-sprayfoam.html)

vainilreb August 22, 2012 09:59

Setting scalar fields in sprayFoam
 
Hi there,

I'm trying to evaluate gas dispersion performance of sprayFoam and so I wanted to initialize a cloud of pure NH3 in a room filled with air (77% N2, 23% O2). I set up the setFieldsDict as follows:

defaultFieldValues
(
volScalarFieldValue NH3 0
volScalarFieldValue O2 0.23
volScalarFieldValue N2 0.77
);

regions
(
boxToCell
{
box (0 0 0) (0.1 0.1 0.1);
fieldValues
(
volScalarFieldValue NH3 1
volScalarFieldValue 02 0
volScalarFieldValue N2 0
);
}
);


The setFields-Function works fine - no warnings, no errors - but in the end I don't get these fields set up. So what's wrong?

vainilreb August 22, 2012 10:29

Well, it turned out to be the mesh. There was no cell center inside the small box, because the cells where to large. Or something like this. :D


All times are GMT -4. The time now is 07:55.