CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   ScalarTransportFoam for RTD calculations (https://www.cfd-online.com/Forums/openfoam-solving/67964-scalartransportfoam-rtd-calculations.html)

santoo_cfd September 2, 2009 02:54

ScalarTransportFoam for RTD calculations
 
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

flavio_galeazzo September 4, 2009 05:30

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.

santoo_cfd September 4, 2009 08:51

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

santoo_cfd September 7, 2009 06:52

little update
 
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.

santoo_cfd September 7, 2009 07:00

valildation paper
 
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

santoo_cfd September 10, 2009 02:20

Fluent comparision
 
4 Attachment(s)
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)

flavio_galeazzo September 10, 2009 07:37

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.

santoo_cfd September 11, 2009 01:15

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

flavio_galeazzo September 18, 2009 03:17

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.

santoo_cfd September 18, 2009 05:15

Thanks flavio for your help. I will try other option and will post back once I validated the results.

--Santhosh

alberto September 19, 2009 02:29

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

santoo_cfd October 5, 2009 09:07

Quote:

Originally Posted by alberto (Post 229899)
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

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.

santoo_cfd December 30, 2009 00:12

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..

francescomarra January 6, 2010 12:48

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 1e-03;
A look to the velocity fields and magnitude could help to understand if a wrong mesh scaling is occurring.

My best regards,

Franco

santoo_cfd January 7, 2010 04:23

Quote:

Originally Posted by francescomarra (Post 241664)
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 1e-03;
A look to the velocity fields and magnitude could help to understand if a wrong mesh scaling is occurring.

My best regards,

Franco


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 Thread-6 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.

chegdan October 16, 2010 18:59

RANS and Scalar Mixing
 
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 OpenFOAM-1.5-dev on Ubuntu 9.10 amd64. Waiting for a reply and thanks in advance.


Dan

chegdan October 21, 2010 14:12

Correct me if I'm wrong
 
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)
            );

was unbounded even with the bounded schemes. However, when I added another term to the equation:

Code:

            solve
            (
                fvm::ddt(C)
              + fvm::div(phi, C)
              + fvm::SuSp(-fvc::div(phi), C)
              - fvm::laplacian(D, C)
              - fvm::laplacian(Dturbulent, C)
            );

it was bounded just fine. I found this by looking at the SpalartAllmaras.C file and from this post (http://www.cfd-online.com/Forums/ope...silon-eqn.html).

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

chegdan October 21, 2010 16:59

Now I understand
 
Like Jasak said in the post (http://www.cfd-online.com/Forums/ope...silon-eqn.html) the

Code:

div(phi,C) = C(div(U)) + U&grad(C)
For continuity to be satisfied div(U) = 0 and we assume is zero. However, for incomplete convergence (see cited post above)...this term is not zero. Therefore we need to move C(div(U)) to account for incomplete convergence that would otherwise be zero.

Code:

div(phi,C) - C(div(U)) = U&grad(C)
A very loose explanation, but it worked and has a physical/numerical significance.

alfa_8C November 12, 2010 10:21

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

santoo_cfd November 12, 2010 21:52

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


All times are GMT -4. The time now is 13:29.