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

OpenFoam - concentration - variable for specie

Register Blogs Community New Posts Updated Threads Search

Like Tree33Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2015, 00:11
Default
  #21
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16
rob3rt 0ng is on a distinguished road
Hi All,

I think I've asked this question here, but haven't got a reply yet (or maybe I havent read carefully)

What is the difference between running scalar transport in simpleFoam under controlDict compared to when I run using the steady solution obtained from simpleFoam and then run scalarTransportFoam? And how to specify effective diffusivity if using the former method?

Kind regards,
Robert

Last edited by rob3rt 0ng; December 1, 2015 at 06:30.
rob3rt 0ng is offline   Reply With Quote

Old   December 1, 2015, 06:16
Default
  #22
Senior Member
 
Join Date: Jul 2009
Posts: 260
Rep Power: 18
kingjewel1 is on a distinguished road
Quote:
Originally Posted by rob3rt 0ng View Post
Hi All,

I think I've asked this question here, but haven't got a reply yet (or maybe I havent read carefully)

What is the difference between running scalar transport in simpleFoam under controlDict using the scalcompared to when I run using the steady solution obtained from simpleFoam and then run scalarTransportFoam? And how to specify effective diffusivity if using the former method?

Kind regards,
Robert
Hi Robert,

From what I've read if you run the scalarTransportFoam in transient mode then the turbulent diffusion is important because the scalar needs to get the diffusion from the turbulent field. But if you run it post-processing then the flow field is frozen and so turbulent diffusion is not varying with time and so is fixed for each cell. From my experience the latter does not work well as it gives unbouded (wrong) values. I have not worked out how to get the Schmidt number into the solver you suggested in your previous post. What's your experience with all this?
kingjewel1 is offline   Reply With Quote

Old   December 1, 2015, 06:37
Default
  #23
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16
rob3rt 0ng is on a distinguished road
Quote:
Originally Posted by kingjewel1 View Post
Hi Robert,

From what I've read if you run the scalarTransportFoam in transient mode then the turbulent diffusion is important because the scalar needs to get the diffusion from the turbulent field. But if you run it post-processing then the flow field is frozen and so turbulent diffusion is not varying with time and so is fixed for each cell. From my experience the latter does not work well as it gives unbouded (wrong) values. I have not worked out how to get the Schmidt number into the solver you suggested in your previous post. What's your experience with all this?
I haven't tried implementing this, but I have some experience with the alphaEff and turbulent Pr number and I'm guessing they should be similar. My problem is I'm not too sure if I can run the scalar transport using the fvOptions and simpleFoam concurrently or run the scalar transport after I get converged simpleFoam values.
rob3rt 0ng is offline   Reply With Quote

Old   December 1, 2015, 06:44
Default
  #24
Member
 
Victor Koppejan
Join Date: May 2015
Posts: 40
Rep Power: 11
vkoppejan is on a distinguished road
I agree with what kingjewel says but it's important to review your systems and evaluate what the dominating mechanisms of transport are.

Also if your flow field reaches a good steady state you could use the frozen flowfield for scalar transport. It's important to realize that your approximating the solution in any case so think about the accuracy you need and the time you want to or can spend for obtaining this.

If you need to evaluate a lot of cases for instance, steady state calculations can help you pinpoint area's of parameter sets that yield good results, you can then use 'proper' transient simulations to get a more detailed solution.
vkoppejan is offline   Reply With Quote

Old   December 1, 2015, 07:05
Default
  #25
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16
rob3rt 0ng is on a distinguished road
Ah ok, thanks for the tips kingjewel and Viktor.

If I run the scalar using the fvOptions, how would I incorporate the turbulence diffusion? Does the scalarTransport from the libutilityFunctionObjects is directly related to the original scalarTransportFoam? And if so, do I specify the Schmidt number of each species variables in the transportProperties or in the controlDict?

Kind regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   December 18, 2015, 21:49
Default
  #26
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 11
wayne14 is on a distinguished road
Quote:
Originally Posted by rob3rt 0ng View Post
Ah ok, thanks for the tips kingjewel and Viktor.

If I run the scalar using the fvOptions, how would I incorporate the turbulence diffusion? Does the scalarTransport from the libutilityFunctionObjects is directly related to the original scalarTransportFoam? And if so, do I specify the Schmidt number of each species variables in the transportProperties or in the controlDict?

Kind regards,
Robert
Hi Robert,
Here I have implemented a passiveScalarSimpleFoam which uses the fvOptions to give a mass source, and takes turbulence diffusion as well as the Schmidt number into account. It has been validated against a wind-tunnel experiment data. You can find it with a simple test case here.

Regards,
Yan
Naresh yathuru and kostnermo like this.
wayne14 is offline   Reply With Quote

Old   November 24, 2016, 04:47
Default tracer source
  #27
Member
 
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10
Juzzvy is on a distinguished road
Good day. I wanted to know if I can implement a tracer in OpenFOAM wherein at that point it will release particles.. I am simulating urban canyon pollution, and based in what I have red on this thread, the scalartransport function and the tracer can be used. My question is, how can I specify which point is my tracer located? Thank you
Juzzvy is offline   Reply With Quote

Old   November 24, 2016, 08:50
Default
  #28
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 11
wayne14 is on a distinguished road
Use fvOptions.

Are you sure that turbulence diffusion and Schmidt number are taken care of in the scalartransport function? I would recommend the solver I posted above. It has been validated against a wind-tunnel experiment data of a 2D urban canyon pollution case.

Best
Yan
wayne14 is offline   Reply With Quote

Old   November 24, 2016, 11:52
Default
  #29
Member
 
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10
Juzzvy is on a distinguished road
Hi Yan,
I don't know yet, but trying to implement the solver that you've made, by the way, does it incorporate the turbulence models? I will try to vary my turbulence model to be used. And also does it work on 3d simulations? Thank you
Juzzvy is offline   Reply With Quote

Old   November 24, 2016, 20:57
Default
  #30
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 11
wayne14 is on a distinguished road
Yes. It is easy in OpenFOAM to change turbulence models and case dimensions.
wayne14 is offline   Reply With Quote

Old   November 28, 2016, 01:49
Default
  #31
Member
 
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10
Juzzvy is on a distinguished road
Hi sorry for the late reply.. I already ran the case you've posted. I'm just wondering how do you visualize the emission/particles in that case? Thank you again
Juzzvy is offline   Reply With Quote

Old   December 7, 2016, 11:13
Default
  #32
Member
 
Justin Maris L. Natividad
Join Date: Mar 2016
Posts: 38
Rep Power: 10
Juzzvy is on a distinguished road
Hi Yan,
I just wanted to ask about the solver that you've recommend, how do you determine the concentration of pollution using that solver? is it the TS? Thank you
Juzzvy is offline   Reply With Quote

Old   August 21, 2020, 11:24
Default Recirculation
  #33
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Hi foamers,

I know this is an old post but I have a question about scalars/concentration at scalarTransportFoam solver. I'have seen that there are some experts at this threat so hope one of you can help me:

In my case I have two inlets (Inlet 1 and RecirculationInt) and two outlets (Outlet and RecirculationOutlet).

The flow enters the domain by the Inlet and exits through Outlet but, the flow that enters through Inlet and RecirculationInlet exits the domain through RecirculationOutlet so that the flows going in and out are:

Inlet Flow= Q1 +Q2
RecirculationInlet= Q3
Outlet= -Q1
RecirculationOutlet= -(Q2+Q3)

Now I need to introduce an scalar so that the concentration that goes out through RecirculationOutlet need to enter again in the domain in order to avoid lossing my scalar concentration.

I'm able to calculate the surface concentration of the patch throughout:

Code:
{
Recirc_T
        {

            type            surfaceFieldValue;
            operation       areaIntegrate;
            libs ("libfieldFunctionObjects.so");
            writeArea       yes;
            regionType      patch;
            surfaceFormat   foam;
            name            RecirculationOutlet;
            enabled         true;
            writeControl   writeTime;
            //writeControl   timeStep; //Output every timestep
            //writeInterval   1; //Cada timestep, guarda valor
            valueOutput     true;
            log             false;
            writeFields     no;
            fields          
            ( T)
}
But this is just for post-processing. Does anybody know how to do this?

Thanks!

Last edited by rarnaunot; August 21, 2020 at 11:42. Reason: typo
rarnaunot is offline   Reply With Quote

Old   August 21, 2020, 13:31
Default
  #34
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

Just some short hints, but depending on the version you are using, maybe you can use:

expressions

Or groovyBC from swak4Foam.

Best of luck,

Tom
rarnaunot likes this.
tomf is offline   Reply With Quote

Old   September 1, 2020, 14:38
Smile Thanks
  #35
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Hi,

I have tried groovyBC as explained by tomf and it worked perfect for me

Quote:
Originally Posted by tomf View Post
Thank you very much!!!
rarnaunot is offline   Reply With Quote

Reply


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
new variable output as a file in openfoam for Ensight plot conceptone OpenFOAM Post-Processing 1 February 18, 2014 15:54
Cannot configure OpenFOAM environment variable in CAE Linux 2011 TommiPLaiho OpenFOAM Installation 9 October 15, 2013 09:44
Problem in installation of OpenFOAM sachin OpenFOAM Installation 7 January 22, 2008 02:40
Installation problems shellbell1999 OpenFOAM Installation 9 April 6, 2006 14:29
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 22:07


All times are GMT -4. The time now is 14:28.