|
[Sponsors] |
November 20, 2022, 16:00 |
add a passive scalar to my simulation
|
#1 |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
I need to add as pollution source in my domain. I want to to do it by using a passiveScalar. then I used a scalerTransport class in controlDict:
HTML Code:
functions
{
pollution
{
type scalarTransport;
libs ("libsolverFunctionObjects.so");
// Optional entries
// Name of scalar field to transport, default = 's'
field s;
// Name of flux field, default = 'phi'
phi phi;
// Name of density field for compressible cases, default = 'rho'
rho rho;
// Name of phase field to constrain scalar to, default = 'none'
phase none;
// Set the scalar to zero on start/re-start
resetOnStartUp no;
// Name of field to use when looking up schemes from fvSchemes
// default = <field>
schemesField s;
// Diffusivity
// Fixed value diffusivity
D 0.0000176;
// Name of field to use as diffusivity, default = 'none'
nut nut;
// Run-time selectable sources
}
};
the problem is OpenFoam shows a fatal error: HTML Code:
[I]keyword diffusion is undefined in dictionary [/I]. |
|
November 21, 2022, 13:24 |
|
#2 |
Senior Member
Join Date: Oct 2017
Posts: 133
Rep Power: 9 |
My guess is that you are using OpenFOAM from openfoam.org but the definitionen of the function object is for OpenFOAM from openfoam.com. Here you can see the explanation for the missing diffusion keyword: https://cpp.openfoam.org/v10/classFo...t.html#details (There it is written "diffusivity entry", but it should be "diffusion entry".)
|
|
November 24, 2022, 05:40 |
it's Done!
|
#3 | |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
Quote:
Thanks a million, your guess was right I corrected my code and it's done. |
||
Tags |
functionobjects, scalartransport, simplefoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add scalar "shift" to an already computed simulation | jcoelho5 | OpenFOAM Programming & Development | 1 | September 13, 2022 20:00 |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
Passive Scalar for particulate contamination spread | Owen2612 | Main CFD Forum | 0 | January 3, 2020 07:15 |
Is it possible add a passive scalar to an already finished simulation? | anon_q | OpenFOAM | 8 | April 3, 2018 04:06 |
Add passive scalar temperature equation to the Channelflow | YANGLIANG | OpenFOAM Running, Solving & CFD | 1 | March 9, 2010 06:23 |