# OpenFoam - concentration - variable for specie

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 30, 2015, 23:11 #21 Member   Robert Ong Join Date: Aug 2010 Posts: 86 Rep Power: 14 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 05:30.

December 1, 2015, 05:16
#22
Senior Member

Join Date: Jul 2009
Posts: 260
Rep Power: 16
Quote:
 Originally Posted by rob3rt 0ng 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?

December 1, 2015, 05:37
#23
Member

Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 14
Quote:
 Originally Posted by kingjewel1 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.

 December 1, 2015, 05:44 #24 Member   Victor Koppejan Join Date: May 2015 Posts: 40 Rep Power: 10 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.

 December 1, 2015, 06:05 #25 Member   Robert Ong Join Date: Aug 2010 Posts: 86 Rep Power: 14 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

December 18, 2015, 20:49
#26
Member

Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
Quote:
 Originally Posted by rob3rt 0ng 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

 November 24, 2016, 03:47 tracer source #27 Member   Justin Maris L. Natividad Join Date: Mar 2016 Posts: 38 Rep Power: 9 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

 November 24, 2016, 07:50 #28 Member   Yan Wang Join Date: May 2015 Location: Beijing Posts: 41 Rep Power: 10 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 __________________ Blog: http://blog.sina.com.cn/multiphyzks RG:https://www.researchgate.net/profile/Yan_Wang154

 November 24, 2016, 10:52 #29 Member   Justin Maris L. Natividad Join Date: Mar 2016 Posts: 38 Rep Power: 9 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

 November 24, 2016, 19:57 #30 Member   Yan Wang Join Date: May 2015 Location: Beijing Posts: 41 Rep Power: 10 Yes. It is easy in OpenFOAM to change turbulence models and case dimensions. __________________ Blog: http://blog.sina.com.cn/multiphyzks RG:https://www.researchgate.net/profile/Yan_Wang154

 November 28, 2016, 00:49 #31 Member   Justin Maris L. Natividad Join Date: Mar 2016 Posts: 38 Rep Power: 9 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

 December 7, 2016, 10:13 #32 Member   Justin Maris L. Natividad Join Date: Mar 2016 Posts: 38 Rep Power: 9 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

 August 21, 2020, 10:24 Recirculation #33 Member   Rosario Arnau Join Date: Feb 2017 Location: Spain Posts: 57 Rep Power: 8 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 10:42. Reason: typo

 August 21, 2020, 12:31 #34 Senior Member   Tom Fahner Join Date: Mar 2009 Location: Breda, Netherlands Posts: 617 Rep Power: 31 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.

September 1, 2020, 13:38
Thanks
#35
Member

Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 8
Hi,

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

Quote:
 Originally Posted by tomf groovyBC from swak4Foam.
Thank you very much!!!

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post conceptone OpenFOAM Post-Processing 1 February 18, 2014 14:54 TommiPLaiho OpenFOAM Installation 9 October 15, 2013 08:44 sachin OpenFOAM Installation 7 January 22, 2008 01:40 shellbell1999 OpenFOAM Installation 9 April 6, 2006 13:29 hjasak OpenFOAM 1 February 2, 2006 21:07

All times are GMT -4. The time now is 16:04.

 Contact Us - CFD Online - Privacy Statement - Top