
[Sponsors] 
September 2, 2009, 02:54 
ScalarTransportFoam for RTD calculations

#1 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
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 kepsilon in simpleFoam) Any kind of suggestion u think of, I am ready to try and post back. Thanks Santhosh 

September 4, 2009, 05:30 

#2 
Member
Flavio Galeazzo
Join Date: Mar 2009
Location: Karlsruhe, Germany
Posts: 32
Rep Power: 10 
scalarTransportFoam could work in your case, as the scalar is purely passive. But you need to modify scalarTransportFoam to use the turbulent diffusivity (alphaEff) from the turbulence model to do that, as your flow is turbulent.


September 4, 2009, 08:51 

#3 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
hi Flavio
Thanks for the information, My mentor was also explaining the same. I think this can be done by changing the laplacian term in the scalarTransportFoam solver from as follows fvm::laplacian(DT, T) to fvm::laplacian(turbulence>alphaEff(), T) I will do the necessary change the post the result if I am successful. If anybody has any other suggestion please post. Thanks santhosh 

September 7, 2009, 06:52 
little update

#4 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
As above suggested I have changed the scalarTransportFoam as follows
laplacian(DT, T) is replaced by laplacian(turbulence>nut() + DT, T) ( simply I took help from simpleFoam solver for other stuff in createFields etc..) Where in transport propertied I have provided with Viscosity for DT entry. I have not seen any further improvement. I am looking for other possibilities to improve the solution. Will post back if I get any good results. Thanks for help Santhosh. 

September 7, 2009, 07:00 
valildation paper

#5 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
Following is the link for the Article which I am trying to validate. You can freely download from the site. Intersted people may try it.
http://www.journalarchive.jst.go.jp/...startpage=1228 Thanks Santhosh 

September 10, 2009, 02:20 
Fluent comparision

#6 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
Hi,
I have tested scalarTransportFoam in openFOAM with UDS approach in fluent. The results are completely different. I have converted the OpenFOAM developed velocity profile (using foamDataToFluent), and used UDS in fluent to get the RTD curve I am attaching the results of results. (fluent developed scalar contour with RTD curve, OF developed scalar countour along the RTD cure) 

September 10, 2009, 07:37 

#7 
Member
Flavio Galeazzo
Join Date: Mar 2009
Location: Karlsruhe, Germany
Posts: 32
Rep Power: 10 
Hi Santhosh,
have you compared the velocity and turbulence (k and epsilon) profiles you got with Fluent and OpenFoam? It appears that you have different solutions there. 

September 11, 2009, 01:15 

#8 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
Hi,
Actually I have taken the steady state solution from openFOAM only. I have converted the openFOAM flow fields to Fluent and did transient study for RTD comparison. So there is no confusion regarding initial velocity fields. (In this comparison exercise I am not taking turbulent diffusion into consideration) What I shown in the figures are Scalar field contour at the end of the transient run and corresponding RTD curves in both fluent and OpenFOAM. To my knowledge scalarTransport equation is so plain and simple and OpenFOAM implementation is robust even for very complex non linear terms. What puzzling me is that huge difference in results of fluent and openFOAM for simple Scalar transport equation solver. If anybody used scalarTransportFoam for RTD calculation help me. I also thinking of using Lagrangian approach for it ,but I am not clear how to proceed in that direction. Thanks Santhosh 

September 18, 2009, 03:17 

#9 
Member
Flavio Galeazzo
Join Date: Mar 2009
Location: Karlsruhe, Germany
Posts: 32
Rep Power: 10 
Hi Santhosh,
Your approach seems to be correct, I have now no idea what is going wrong. My only comment is that, if you are using nut() in the scalar equation, the turbulent diffusion effects are being taken into account. 

September 18, 2009, 05:15 

#10 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
Thanks flavio for your help. I will try other option and will post back once I validated the results.
Santhosh 

September 19, 2009, 02:29 

#11 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
Hi,
I don't understand what you did actually. Did you add a scalar transport equation to simpleFoam, or do you get a steady solution from simpleFoam and then run scalarTransportFoam on it? If you do the latter, it is not correct to use turbulence>nut(), and the procedure is a lot simpler, since it is enough to read in scalarTransportFoam the field of the turbulent viscosity associated with the velocity field already provided as input, and use the appropriate effective diffusivity. Best, Alberto
__________________
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 opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

October 5, 2009, 09:07 

#12  
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
Quote:
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. 

December 30, 2009, 01:12 

#13 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
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 1e6. 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.. 

January 6, 2010, 13:48 

#14 
Member
Franco Marra
Join Date: Mar 2009
Location: Napoli  Italy
Posts: 52
Rep Power: 10 
Dear Santhosh,
I had a look to your thread just now, maybe I am too late to help. Actually, it is difficult to say why your solutions are so different. But for me they appears too different to be the solution of the same problem. Just to suggest a possible cause, have you double checked that domain dimensions are the same ? How did you built the mesh ? At the beginning of the blockMeshDict, a line allows to control the scale factor. To write coordinates in mm and properly scale the mesh to meters: convertToMeters 1e03; A look to the velocity fields and magnitude could help to understand if a wrong mesh scaling is occurring. My best regards, Franco 

January 7, 2010, 05:23 

#15  
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
Quote:
Hi Franko, Thanks for the reply. Your suggestion very important that people usually forget to scale. In my case I have created mesh from third party software and properly scaled down after import. Anyways to avoid any ambiguity in comparision I have exported the steady state results of OpenFOAM to Fluent and did scalarTransport steady in fluend as I discussed in Thread6 of this post. you can see the results also there. Now I am doing fresh run of complete case again with another standard benchmark problem. Now I got enough expertize that I can do this very easily. I will post back with results soon. (This new one also eliminate if any simple mistakes I have done previously) Regards Santhosh. 

October 16, 2010, 18:59 
RANS and Scalar Mixing

#16 
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 604
Rep Power: 22 
Hello Fellow Foamers,
I'm doing some RTD calculations an a fairly complicated geometry that I have a steady state flow field determined from simpleFoam. Now I am performing RTD calculations with a step input of tracer into the domain. That is the ultimate goal, however on some simple cases I'm having some issues. First of all I have my solver, which is a scalarTransportFoam derived solver to include a turbulent mass diffusivity. solve ( fvm::ddt(C) + fvm::div(phi, C)  fvm::laplacian(D, C)  fvm::laplacian(Dturbulent, C) ); where Dturbulent is related to the nut field through an assumed value of turbulent Schmidt number (suggested in both Fluent and a book by Fox "computational models for turbulent reacting flows"). My problem is that the scalar is unbound even if I use the bounded schemes in fvSchemes (see attached). I see values higher than 1 (injection C = 1). I have altered the Peclet number utility to use Deff=D+Dturbulent and there are some values that are still >>2 (suggested value from Ferziger and Peric "Computational Methods for Fluid Dynamics" in eqn 6.33). I understand that the Pe rule was for a different scheme. My questions are: 1) is this a problem with my schemes? 2) is there some other addition to the model I need (i.e. include ensemble averaging...if its not already in the solver)? 3) refine my mesh to be more Peclet Number friendly? if so how can I refine only the cells that have a terrible peclet number? I have included a link (http://students.cec.wustl.edu/~dc3/) to the solver, test case, and sample utility that one would need to do exactly what I am doing. I am using OpenFOAM1.5dev on Ubuntu 9.10 amd64. Waiting for a reply and thanks in advance. Dan 

October 21, 2010, 14:12 
Correct me if I'm wrong

#17 
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 604
Rep Power: 22 
Just following up a little bit on my previous post, however I'm still not clear on why this works.
Code:
solve ( fvc::ddt(C) + fvc::div(phi, C)  fvc::laplacian(D, C)  fvc::laplacian(Dturbulent, C) ); Code:
solve ( fvm::ddt(C) + fvm::div(phi, C) + fvm::SuSp(fvc::div(phi), C)  fvm::laplacian(D, C)  fvm::laplacian(Dturbulent, C) ); The explanation was not that clear to me, but I will try and look at it some more today and make some sense of it. if anyone can explain (or clarifiy the post where it came from) I would greatly appreciate it. Dan 

October 21, 2010, 16:59 
Now I understand

#18 
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 604
Rep Power: 22 
Like Jasak said in the post (http://www.cfdonline.com/Forums/ope...siloneqn.html) the
Code:
div(phi,C) = C(div(U)) + U&grad(C) Code:
div(phi,C)  C(div(U)) = U&grad(C) 

November 12, 2010, 11:21 

#19 
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 72
Rep Power: 7 
Hello Foamers,
I found this Thread which is closely related to my current problem and it encouraged me to ask some questions I'd like to simulate smoke propagation. The smoke can be treated as massless. The idea is to first generate a flow field for every timestep with all the necessary phyics, and then to apply scalarTransportFoam after every timestep, where the smoke is representing my scalar. As I have no programming experience jet regarding openFoam solvers  how can I adopt the current "scalarTransportFoam" with "T" as scalar to i.e "smokeTransportFoam" with "smoke" as scalar. Any hints? Thanks a lot in advance, Tony 

November 12, 2010, 22:52 

#20 
Member
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 9 
You need not to create any separate solver, just existing scalarTransportFoam with T as your smoke. Just you need to give the proper diffusivity value. In case your case involves turbulence, you need to change the solver in order to account for turbulence diffusivity. Check the above posts do it.
Sorry for late update, I got excellent results with scalarTransportFoam for RTD calculations very closely matching with experiment. Regards, Santhosh 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Hardware for Cfx/openfoam calculations of 3050 million cells  Rkeck  Hardware  8  July 13, 2009 12:12 
transient calculations!  lelia  CDadapco  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 