|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Feb 2016
Posts: 4
Rep Power: 11 ![]() |
Hello all,
I'm trying to use a scalarTransport Function Object to track the concentration of particles leaving a water tank, but I keep getting errors. I'm using openFoam 3.0. In my controlDict, I've tried two approaches: Code:
libs ( "libutilityFunctionObjects.so" ); functions { S { type scalarTransport; outputControl outputTime; resetOnStartUp false; autoSchemes true; fvOptions { S-01 { type scalarExplicitSetValue; active true; selectionMode cellZone; cellZone sampleInlet; scalarExplicitSetValueCoeffs { injectionRate { U 1.0; } } } }; } } --> FOAM FATAL IO ERROR: keyword selectionMode is undefined in dictionary "IOstream.functions.S.fvOptions.S-01.scalarExplicitSetValueCoeffs" The other approach I tried in ControlDict was this: Code:
functions { S { type scalarTransport; functionObjectLibs ("libutilityFunctionObjects.so"); enabled true; outputControl outputTime; setFormat csv; write interval 1; resetOnStartUp false; autoSchemes true; write true; log true; DT 10e-9; fvOptions {}; #includeEtc "caseDicts/postProcessing/scalarTransport/scalarTransportDict.cfg" } } scalarTransport output: smoothSolver: Solving for S, Initial residual = 0, Final residual = 0, No Iterations 0 my constant/transportProperties file looks like this: Code:
transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1e-05; CrossPowerLawCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; m m [ 0 0 1 0 0 0 0 ] 1; n n [ 0 0 0 0 0 0 0 ] 1; } BirdCarreauCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; k k [ 0 0 1 0 0 0 0 ] 0; n n [ 0 0 0 0 0 0 0 ] 1; } |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
|
Hi,
The error output is actually quite useful. Quote:
Code:
S { type scalarTransport; outputControl outputTime; resetOnStartUp false; autoSchemes true; fvOptions { S-01 { type scalarExplicitSetValue; active true; scalarExplicitSetValueCoeffs { selectionMode cellZone; cellZone sampleInlet; injectionRate { U 1.0; } } } }; } } |
||
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Join Date: Feb 2016
Posts: 4
Rep Power: 11 ![]() |
Thanks so much! Your suggestion solved the first error.
Now, the pisoFoam log is returning Code:
scalarTransport output: smoothSolver: Solving for S, Initial residual = 0, Final residual = 0, No Iterations 0 Code:
scalarTransport output: --> FOAM Warning : From function void option::checkApplied() const in file fvOption/fvOption.C at line 120 Source S-01 defined for field U but never used --> FOAM Warning : From function void option::checkApplied() const in file fvOption/fvOption.C at line 120 Source S-01 defined for field U but never used smoothSolver: Solving for S, Initial residual = 0, Final residual = 0, No Iterations 0 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
|
I think that you would need to use "S", since you are creating a source for the S field. So your source just generates 1 "S" per second and you velocity field is used to advect it through the domain.
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Join Date: Feb 2016
Posts: 4
Rep Power: 11 ![]() |
Thanks for your reply. This post: http://www.cfd-online.com/Forums/ope...tsetvalue.html has a different variable for the field than the name of the function object.
Also, after further thought, I'm not sure I should use U since velocity is not a scalar and scalarTransport solves for a scalar. Do you have any other thoughts? |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
|
The post you are referencing to is trying to achieve something else. Did you try my suggestion? Because I used a similar approach, which gave me the expected result (note I called my scalar "Lak" instead of "S":
Code:
Lak { type scalarTransport; functionObjectLibs ("libutilityFunctionObjects.so"); outputControl outputTime; active true; autoSchemes false; nCorr 0; resetOnStartUp false; fvOptions { SetLak { type scalarExplicitSetValue; active true; scalarExplicitSetValueCoeffs { injectionRate { selectionMode cellZone; cellZone LakSet; Lak 1; } } } } } |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
fvOption scalarTransport and diffusivity | Tobi | OpenFOAM Running, Solving & CFD | 0 | March 15, 2016 10:21 |
fvOptions scalarTransport utility | matthew.legg | OpenFOAM Post-Processing | 16 | April 14, 2015 13:23 |
Radial diffusion in scalarTransport problem | jr33 | OpenFOAM | 0 | April 16, 2013 19:22 |
Regarding the adaptation of scalarTransport Foam as well as general openFOAM logic. | HFonten1 | OpenFOAM | 0 | August 10, 2010 14:05 |
Initialization in scalarTransport | skabilan | OpenFOAM Running, Solving & CFD | 8 | August 25, 2008 11:45 |