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

ScalarTransportFoam for RTD calculations

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree6Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   November 13, 2010, 06:09
Default
  #21
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 67
Rep Power: 6
alfa_8C is an unknown quantity at this point
Hello Santhosh,

thanx a lot for your quick reply!

The flow field I provide for applying scalarTransportFoam on is the result of a thermal simulation where the variable T ist already used for the Temperature. Even if scalarTransportFoam only needes the p and U filed and in that simulation the variable T can be regarded as a free one, later, in the postprocessing, I'd like to distinct the T for temperature and T for smoke. Obviously it is possible to rename the scalarFiled T generated by scalarTransportFoam - in my case into "smoke". But it would be far more elegant to rename the variable directly within the solver.

Do you think it is a big deal to do that?

Best regards
Tony
alfa_8C is offline   Reply With Quote

Old   November 13, 2010, 12:36
Default
  #22
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 69
Rep Power: 8
santoo_cfd is on a distinguished road
It is very simple...To have more Idea go through following link...
http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

If you dont have patience, just copy scalarTransportFoam to your directory and rename variable T to whatever you want, change the name of solver in Make directory of your choice and create a new solver.

I suggest you to spend little more time in learning basic stuff in OpenFOAM, you will find your life easier in your further work.

Santhosh.
santoo_cfd is offline   Reply With Quote

Old   November 15, 2010, 10:44
Default
  #23
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 67
Rep Power: 6
alfa_8C is an unknown quantity at this point
Hello Santhosh,

changing the variable Name within scalarTransportFoam worked without any problems.

Now I am following your suggestion, to implement turbulence in my new, from scalarTransportFoam derived solver. I'm trying to do so following the posts of the present thread. But I'm struggling with compiling.

This is how the changes in my .C file from the Make directory looks like (changed strings in red):

for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
solve
(
fvm::ddt(Smoke)
+ fvm::div(phi, Smoke)
- fvm::laplacian(turbulence->mut() + DSmoke, Smoke)
);

I didn't change anything else - most probably I have to, but I don't know where and what.

The error message I receive is the following:
smokeTurbulentTransportFoam.C:65: error: ‘turbulence’ was not declared in this scope

Any idea how to solve this?

Tony
alfa_8C is offline   Reply With Quote

Old   November 15, 2010, 11:44
Default turbulence model needs to be included
  #24
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 559
Rep Power: 18
chegdan will become famous soon enough
Quote:
The error message I receive is the following:
smokeTurbulentTransportFoam.C:65: error: ‘turbulence’ was not declared in this scope
This error message is because your turbulence model was not defined in your solver. This will take some additional steps, so you should look a the simpleFoam solver and see how they have added a RAS turbulence model to the solver. This means that you will have to also have additional dict files with the RAS model you want and some constants in your caseName/constant folder. Again, have a look at the simpleFoam tutorials to see how those look.
chegdan is offline   Reply With Quote

Old   March 26, 2012, 05:51
Default
  #25
New Member
 
shyam prasad
Join Date: Mar 2009
Posts: 25
Rep Power: 8
shyam is on a distinguished road
Hi Santhoosh,
Any logic behind increasing the diffusivity from 1e-6 (fluent) to 100 (openfoam).
shyam is offline   Reply With Quote

Old   March 26, 2012, 10:16
Default
  #26
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by shyam View Post
Hi Santhoosh,
Any logic behind increasing the diffusivity from 1e-6 (fluent) to 100 (openfoam).
Do you notice this in your results? One of the most common mistakes is not considering the proper term in the equation. In other words the turbulent diffusivity you have to consider is nut/Sc, being Sc the turbulent Schmidt number.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats.
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   July 11, 2013, 06:14
Default
  #27
New Member
 
shyam prasad
Join Date: Mar 2009
Posts: 25
Rep Power: 8
shyam is on a distinguished road
Quote:
Do you notice this in your results? One of the most common mistakes is not considering the proper term in the equation. In other words the turbulent diffusivity you have to consider is nut/Sc, being Sc the turbulent Schmidt number.
Alberto,

Evening using nut/Sc as the turbulent diffusivity does not help to reproduce the results I have predicted from fluent. in fact in fluent i have made the Sc value very high 10000000 so as to neglect the turbulent diffusivity. the molecular diffusivity value was set to 10e-12. i am using the same parameters in openfoam but the results are way off. any comments or suggestion?
shyam is offline   Reply With Quote

Old   July 12, 2013, 02:47
Default
  #28
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 69
Rep Power: 8
santoo_cfd is on a distinguished road
Quote:
Originally Posted by shyam View Post
Hi Santhoosh,
Any logic behind increasing the diffusivity from 1e-6 (fluent) to 100 (openfoam).

There is no logic in doing this and it is wrong to do it. Please don't do it as it is not the reason for wrong results in OpenFOAM.

Results between OpenFOAM and Fluent were not matching because of human error of not scaling down the mesh converted to OpenFOAM.

scalarTransportFoam in OpenFOAM works pretty fine as it is. As I have mentioned earlier, turbulence effect can be included by adding turbulent diffusivity.

Sorry for the confusion, if any, in above posts.
santoo_cfd is offline   Reply With Quote

Old   May 14, 2014, 08:10
Default
  #29
New Member
 
jeicek
Join Date: Nov 2013
Location: Germany
Posts: 18
Rep Power: 4
jeicek is on a distinguished road
Quote:
Originally Posted by santoo_cfd View Post
Hi Alberto,

Thanks for the information, Actually I was busy with other work thus late in reply.

Now, I have done another simulation run as per your suggestion. I changed the createFields in scalarTransportFoam to read nut values directly. I have added this to Diffusivity values. i.e, laplacian(DT+nut, phi).
(Here, nut is read from 0 directory which I got from steady state run using simpleFoam)

The problem is still I am unable to get the results as that of fluent.

Regards
Santhosh.

Hi guys,

Santoo I do the same case. can u plz explaine how should I do these modificarions? I mean shall I creat new solver or change the source code? I m not good in c++

thanks in advanced
jeicek is offline   Reply With Quote

Old   May 14, 2014, 10:00
Default
  #30
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 559
Rep Power: 18
chegdan will become famous soon enough
Greetings! Have you read this thread fully and noticed the post

ScalarTransportFoam for RTD calculations

that outlined the equation to be used? The c++ is actually not too painful and if you aren't good its really a great place to start. I would look at the equation from that particular post; decide what information you need i.e. velocity, turbulence schmidt number, nut; take a look at other solvers like solvers/basic/scalarTransportFoam or even icoFoam for inspiration; write your solver and then compile. If you are having issues compiling things then I would take the time to start with learning how to compile OpenFOAM on your own. These days it has become easier and easier to compile using instructions like these or these, depending on if you are using standard or foam extend. Good luck!
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   May 14, 2014, 15:20
Default
  #31
New Member
 
jeicek
Join Date: Nov 2013
Location: Germany
Posts: 18
Rep Power: 4
jeicek is on a distinguished road
Quote:
Originally Posted by santoo_cfd View Post
Hi

I want to get the RTD (Residence time distribution) of for steel industry application. The procedure I followed is as follows,
Methodology:
1. Steady state - I ran simpleFoam to get the initial velocity Field. I ensured 5 orders of residue fall
2. Tracer Injection - I used to velocity field from the simpleFoam and used scalarTransportFoam for passsive scalar injection. ( Traced inlet boundary set to 1 for 0.129 sec)
3. RTD study - I monitored the tracer concentration at the outlet for 1000 secs using scalarTransportFoam.

Problems

1. RTD curve is not matching either with fluent or experiment.
2. I have some confusion regarding the use of slip boundary condition in OpenFOAM. Is it similar the boundary we set in Fluent ( I mean we set shear stess =0 for wall with slip).
3. Is it right to use scalarTransportFoam or should I need scalarTranportFoam with turbulence added to it? ( As flow regime is turbulent, I used k-epsilon in simpleFoam)

Any kind of suggestion u think of, I am ready to try and post back.

Thanks
Santhosh
Hi dude,
Can u help me? how should I monitor the concentration at the outle in order to plot the RTD?
jeicek is offline   Reply With Quote

Old   May 14, 2014, 15:33
Default
  #32
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 559
Rep Power: 18
chegdan will become famous soon enough
For monitoring at the outlet, you probably want mixing-cup average. I generally use the tool

simpleFunctionObjects

which is part of

swak4Foam


and use the patchMassFlowAveraged function for mixing-cup average. Again, you will need to be able to compile this tool.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   May 16, 2014, 03:02
Default
  #33
New Member
 
jeicek
Join Date: Nov 2013
Location: Germany
Posts: 18
Rep Power: 4
jeicek is on a distinguished road
Quote:
Originally Posted by chegdan View Post
For monitoring at the outlet, you probably want mixing-cup average. I generally use the tool

simpleFunctionObjects

which is part of

swak4Foam


and use the patchMassFlowAveraged function for mixing-cup average. Again, you will need to be able to compile this tool.
Daniel thank you very much for fast reply. I went through the Contrib/swak4Foam wiki page:
http://openfoamwiki.net/index.php/Contrib/swak4Foam

So as far I understood in order to use functionobject ( in our case PatchMassFlowAveraged) we need to install (compile) the swak4Foam. But I typed the command wmake all but it has taken very long about 17 hours and still compiling (and my space is about 28 GB)?!! Shall I wait still?? everything is correct??
Thanks in advance

jeicek is offline   Reply With Quote

Old   May 16, 2014, 09:48
Default
  #34
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 559
Rep Power: 18
chegdan will become famous soon enough
@jeicek

Cancel the compilation, it should not take that long. A few questions for you:
  • What operating system are you using?
  • Is there a log file associate with your compilation and are there any errors?
  • what version of OpenFOAM are you using?
  • have you compiled OpenFOAM before i.e. do you have all the necessary external libraries to compile OpenFOAM code?
  • can you compile a simple solver like this one here?

It may be best to find threads related to swak4Foam compilation and post there, or start an entirely new thread about your overall goal (in the programming and development sub-forum?). When that happens, post a link here leading others their that may need similar help (a link not asking for help, but informing others that there is a new thread and what the topic is) and I will follow that and answer questions over there. Try to formulate a good post so others will join according to How to give enough info to get help .I will see you there at your new post
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   May 22, 2014, 10:20
Default
  #35
New Member
 
jeicek
Join Date: Nov 2013
Location: Germany
Posts: 18
Rep Power: 4
jeicek is on a distinguished road
Quote:
Originally Posted by chegdan View Post
@jeicek

Cancel the compilation, it should not take that long. A few questions for you:
  • What operating system are you using?
  • Is there a log file associate with your compilation and are there any errors?
  • what version of OpenFOAM are you using?
  • have you compiled OpenFOAM before i.e. do you have all the necessary external libraries to compile OpenFOAM code?
  • can you compile a simple solver like this one here?

It may be best to find threads related to swak4Foam compilation and post there, or start an entirely new thread about your overall goal (in the programming and development sub-forum?). When that happens, post a link here leading others their that may need similar help (a link not asking for help, but informing others that there is a new thread and what the topic is) and I will follow that and answer questions over there. Try to formulate a good post so others will join according to How to give enough info to get help .I will see you there at your new post
Thank you very much again Daniel it was fixed.
jeicek is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardware for Cfx/openfoam calculations of 30-50 million cells Rkeck Hardware 8 July 13, 2009 12:12
transient calculations! lelia CD-adapco 9 April 14, 2008 08:33
VKI plane turbine cascade calculations Ong Main CFD Forum 0 June 3, 2003 21:07
Difference between two calculations Lennart FLUENT 7 November 24, 2002 02:19
Implicit transient calculations using Fluent5 G. Berntsen Main CFD Forum 4 November 10, 1999 16:32


All times are GMT -4. The time now is 20:31.