CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

add a passive scalar to my simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2022, 16:00
Post add a passive scalar to my simulation
  #1
New Member
 
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6
arezayan87 is on a distinguished road
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].
my solver is simpleFoam
arezayan87 is offline   Reply With Quote

Old   November 21, 2022, 13:24
Default
  #2
Senior Member
 
Join Date: Oct 2017
Posts: 133
Rep Power: 9
Krapf is on a distinguished road
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".)
Krapf is online now   Reply With Quote

Old   November 24, 2022, 05:40
Default it's Done!
  #3
New Member
 
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6
arezayan87 is on a distinguished road
Quote:
Originally Posted by Krapf View Post
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".)
---------------------------------------------------------
Thanks a million,
your guess was right I corrected my code and it's done.
arezayan87 is offline   Reply With Quote

Reply

Tags
functionobjects, scalartransport, simplefoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 12:06.