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

ScalarTransportFoam for RTD calculations

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

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2010, 05:09
Default
  #21
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 14
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, 11:36
Default
  #22
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
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, 09:44
Default
  #23
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 14
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, 10:44
Default turbulence model needs to be included
  #24
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan 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: 17
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,912
Rep Power: 36
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 (current status: http://albertopassalacqua.com/?p=1541)
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: 17
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: 70
Rep Power: 17
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: 12
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
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Greetings! Have you read this thread fully and noticed the post

http://www.cfd-online.com/Forums/ope...tml#post280210

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!
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: 12
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
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan 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.
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: 12
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
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan 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 http://www.cfd-online.com/Forums/ope...-get-help.html .I will see you there at your new post
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: 12
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 http://www.cfd-online.com/Forums/ope...-get-help.html .I will see you there at your new post
Thank you very much again Daniel it was fixed.
jeicek is offline   Reply With Quote

Old   September 22, 2019, 04:52
Default RTD with DT of 100 so did it work fo rth eother modles in seeting diffusion to 100
  #36
Member
 
Munaf
Join Date: May 2019
Posts: 38
Rep Power: 6
mwmalkawi is on a distinguished road
RTD with DT of 100 so did it work fo rth eother modles in seeting diffusion to 100?


Quote:
Originally Posted by santoo_cfd View Post
Hi,

I revisited the case and think that I have solved the problem. The trick (ofcourse not) is that I have increased the Diffusivity value to 100 and I got similar RTD pattern I obtained with Fluent with corresponding diffusivity of 1e-6.

Apart, The steady state velocity profile I got with simpleFoam are in excellent agreement with Fluent and experimental observation.

So, I thought the normalization of Diffusity values the solver does is different in OpenFOAM and Fluent.

Anyway Now I will do some other parameter study in openFOAM to get more insight.

Thanks to Dr.Eelco from TATA Corus in helping me to get confidence in this exercise.

Thanks all the contributors to this thread.

I will post back with other results soon.


Santhosh..
RTD with DT of 100 so did it work fo rth eother modles in seeting diffusion to 100
mwmalkawi is offline   Reply With Quote

Old   September 22, 2019, 09:16
Default
  #37
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi is on a distinguished road
Quote:
Originally Posted by mwmalkawi View Post
RTD with DT of 100 so did it work fo rth eother modles in seeting diffusion to 100?
You have alittle typo;
"with DT of 100 so did it work for the other modles..." rather than "with DT of 100 so did it work fo rth eother modles".

I also don't understand what do you mean by "seeting diffusion to 100"
amuzeshi is offline   Reply With Quote

Old   May 22, 2020, 11:43
Default
  #38
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
hello everybody,
I have a doubt with the usage of the scalarTransportFoam to calculate the RTD,
as i have read several threads, there is a lot of people using it for this, with the need of modification in case that our case that the flow is turbulent. my doubt is in respect to the dimensions of T and D. normally D it should m2/s and T it is a concentration normalized, so it should be adimensional, but in the T file it has unit (K). shouldn't this disrupt the units of the equation?

thanks in advance,
franco
otaolafr is offline   Reply With Quote

Old   May 23, 2020, 04:00
Default
  #39
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi is on a distinguished road
Quote:
Originally Posted by otaolafr View Post
hello everybody,
I have a doubt with the usage of the scalarTransportFoam to calculate the RTD,
as i have read several threads, there is a lot of people using it for this, with the need of modification in case that our case that the flow is turbulent. my doubt is in respect to the dimensions of T and D. normally D it should m2/s and T it is a concentration normalized, so it should be adimensional, but in the T file it has unit (K). shouldn't this disrupt the units of the equation?

thanks in advance,
franco
Hello,
"Disruption" occurs when the dimensions of the terms (convection, diffusion, ...) are inconsistent. Setting an arbitrary unit for field T causes no inconsistency.
otaolafr likes this.
amuzeshi is offline   Reply With Quote

Old   July 12, 2021, 01:15
Default hie Santoo
  #40
New Member
 
Luckmore Kadzungura
Join Date: Jul 2021
Posts: 12
Rep Power: 4
Lucky 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.



I know it has been about a decade since you posted this but i have tried what you are suggesting and i keep getting funny errors here are the edits i did.


i added this chunk in the createFields.H in scalarTransportFoam:


Info<< "Reading field nut\n" << endl;

volScalarField nut
(
IOobject
(
"nut",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);


In the fvShemes i did this'


laplacianSchemes
{
default none;
//laplacian(DT,T) Gauss linear corrected;
laplacian(DT+nut,phi) Gauss linear corrected;
}



i am getting the following error:
[1]
[1]
[1] --> FOAM FATAL IO ERROR: (openfoam-2106)
[1] Entry 'laplacian(DT,T)' not found in dictionary "stream.laplacianSchemes"
[1]
[1]
[1] file: stream.laplacianSchemes at line 0.
[1]
[1] From const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, Foam::keyType:ption) const
[1] in file db/dictionary/dictionary.C at line 413.
[1]
FOAM parallel run exiting
[1]
[0]
[0]
[0] --> FOAM FATAL IO ERROR: (openfoam-2106)
[0] Entry 'laplacian(DT,T)' not found in dictionary "/home/lka62/Documents/oF2106/1000/10/scalarT/system/fvSchemes.laplacianSchemes"
[0]
[0]
[0] file: /home/lka62/Documents/oF2106/1000/10/scalarT/system/fvSchemes.laplacianSchemes at line 35 to 37.
[0]
[0] From const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, Foam::keyType:ption) const
[0] in file db/dictionary/dictionary.C at line 413.
[0]
FOAM parallel run exiting
[0]
[2]
[2]
[2] --> FOAM FATAL IO ERROR: (openfoam-2106)
[2] Entry 'laplacian(DT,T)' not found in dictionary "stream.laplacianSchemes"
[2]
[2]
[2] file: stream.laplacianSchemes at line 0.
[2]
[2] From const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, Foam::keyType:ption) const
[2] in file db/dictionary/dictionary.C at line 413.
[2]
FOAM parallel run exiting





what am i doing wrong, its a simulation of flow in porous media and i am using the results from simpleFoam.
Lucky is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 Siemens 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 01:19
Implicit transient calculations using Fluent5 G. Berntsen Main CFD Forum 4 November 10, 1999 15:32


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