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

Passive Scalar Function Object - Setting of alphaD and alphaDt

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By foamF
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2019, 05:00
Default Passive Scalar Function Object - Setting of alphaD and alphaDt
  #1
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 7
foamF is on a distinguished road
Hi, everyone. I have a problem about the passive scalar function object in OpenFOAM.

I just did a simulation on a contact tank with OpenFOAM (v1712), using RANS kOmegaSST turbulent model to simulate the setup described in the paper "An Efficient Contact Tank Design for Potable Water Treatment", which can be downloaded in the following link:

https://www.google.com/url?sa=t&sour...-dGNtZusWSxxU7

First, I used pimpleFOAM (without passive scalar function object) to achieve a steady state. Then, to compute the RTD plot, I added the built-in passive scalar function object in controlDict to simulate the transient passive scalar transport.

My simulated flow field results (in the first simulation) agree well with the experiment results and the LES results in the paper. In my second simulation, I used the default settings of alphaD and alphaDt (default to be 1), the simulation results also fairly match with the LES results.

Up to now, it sounds not bad. But, the problem arises once I played with the settings of alphaD and alphaDt. To my understanding, alphaD is the reciprocal of Schmidt No. and alphaDt is the reciprocal Turbulent Schmidt No. I tried the following cases:

Case 1 - alphaD = 0.001 (Sc = 1,000) and alphaDt = 1.4286 (Sct = 0.7). The results changed a lot and got significant difference from the LES results.

Case 2 - alphaD = 1.4286 and alphaDt = 0.001. The result is not bad, it fairly agree with the LES results.

Case 3 - alphaD = alphaDt = 1.4286. The results is very close to the original cases (alphaD = alphaDt = default value 1).

The settings of alphaD and alphaDt in Case 1 is my target settings with reasonable physical meanings, but the results are bad. For the original case and case 3, the results are good but it appears not physically correct for Sc = Sct in water.

Any expert can provide me some hints?
fumiya likes this.
foamF is offline   Reply With Quote

Old   January 22, 2019, 03:53
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I think you should use alphaD = 1 and alphaDt = 1/0.7 as the way I see it, Sc(t) = 1/alpha(t). This is because we use kinematic viscosity nu instead of dynamic viscosity mu.

So I would say alphaD = 1, alphaDt = 1.4286 should give the results you want.

Regards,
Tom
fumiya likes this.
tomf is offline   Reply With Quote

Old   January 22, 2019, 06:54
Default
  #3
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 7
foamF is on a distinguished road
Thank you so much for your reply.

I can understand that alphaDt = 1 / Sct so that alphaDt = 1 / 0.7 for Sct = 0.7 as a typical value.

But for the solute in water, Sc is in the order of 1,000 (this is the value suggested in the paper I mentioned in my previous post). That's what I don't understand why alphaD is not set to 1/1000 = 0.001.

Although I agree that Sc = 1 and and Sct = 1 / 0.7 would give a better results close to LES results, I don't have a good explanation on using alpha = 1. May I have an explanation from you about that?
foamF is offline   Reply With Quote

Old   January 22, 2019, 07:39
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Ah yes, I reread your post and I see you already mentioned this. I guess I did not have enough coffee yet. I just got confused as I assumed you used the density of water in the derivation, once again showing the assumptions are dangerous. I am sorry for the confusion.

Unfortunately I have no time to delve into the paper. I just briefly scanned it and I would agree with your settings. So in that sense I do not really know where the error comes from.

It is maybe useful to show your results? I can think of the following:
- There may be some issues with the implementation, but at least you showed different results with different settings, so it seems at least to have an effect to the solution, just not the expected effect.
- There may be something about the effect of the turbulence model?
- As molecular diffusion would be very limited, you may get discretisation issues as your diffusion gets much smaller and therefore you may need to use more upwinding to keep your solution stable? This would happen most prominently in areas with low turbulent viscosity and also depend on your mesh quality.

Hope this helps.
Regards,
Tom
tomf is offline   Reply With Quote

Old   January 24, 2019, 23:36
Default
  #5
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 7
foamF is on a distinguished road
Thanks a lot, tomf.

I got the points finally after many many trials. The correct setting should be alphaD = 1/1000 and alphaDt = 1/0.7.
foamF is offline   Reply With Quote

Old   August 3, 2019, 06:00
Default
  #6
New Member
 
Paul S
Join Date: Mar 2018
Posts: 11
Rep Power: 8
Stanley91 is on a distinguished road
Hi foamF

Did you follow a specific tutorial to carry this out? I'm trying to compute the RTD plot for a contact tank too.

I'm trying to find more information on plotting the RTD curve once the scaler has been added. I'm not sure how to manipulate the data in paraview

Last edited by Stanley91; August 4, 2019 at 10:24.
Stanley91 is offline   Reply With Quote

Old   August 5, 2019, 12:02
Default
  #7
Member
 
Join Date: Aug 2018
Posts: 47
Rep Power: 7
foamF is on a distinguished road
I don't have any relevant specific tutorial.

To plot RTD curve in Paraview, it can be done by integrating the (mass flow weighted) scalar of across a selected cross section.
foamF is offline   Reply With Quote

Old   August 8, 2019, 13:39
Default
  #8
New Member
 
Paul S
Join Date: Mar 2018
Posts: 11
Rep Power: 8
Stanley91 is on a distinguished road
So I select cells on the outlet, data analysis -> Integrate variables, data analysis -> plot selection over time
Stanley91 is offline   Reply With Quote

Old   June 10, 2020, 17:14
Default
  #9
New Member
 
Chihuahua
Join Date: Jun 2020
Posts: 2
Rep Power: 0
Rigoberto Ortiz is on a distinguished road
Hello
just a question

How did you define alphaD and alphaDt in controlDict? In the sample of the UserGuide only D is defined. I have to define alpha in the same way or I have to do something different?

Thanks a lot
Rigoberto Ortiz is offline   Reply With Quote

Old   June 11, 2020, 04:44
Default
  #10
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Please have a look at the online Source Guides:

OpenFOAM 7

OpenFOAM v1912 (or later)

This is usually the most up to date information.
tomf is offline   Reply With Quote

Old   June 11, 2020, 13:11
Default
  #11
New Member
 
Chihuahua
Join Date: Jun 2020
Posts: 2
Rep Power: 0
Rigoberto Ortiz is on a distinguished road
Hi Tom.
Thank you for your answer.
I read it and I have tried with

//
alphaD=0.1;
alphaDt=0.005;
//

//
D=0.1*nu +0.005*nut;
//

But none works.
I wrote it in controlDict but I do not know if I need to declare alphas there or not.

thank you
Rigoberto Ortiz is offline   Reply With Quote

Old   June 12, 2020, 03:47
Default
  #12
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Try it like this, so inside the dict entry where you define the scalarTransport functionObject:

Code:
scalarTransport
    {
        type            scalarTransport;
        libs            ("libsolverFunctionObjects.so");

        alphaD            0.1;
        alphaDt           0.005; 
    }
You need to fill in other parameters that you are currently not sharing with us.
tomf is offline   Reply With Quote

Old   October 13, 2022, 04:45
Default
  #13
New Member
 
Thomas Shi
Join Date: Jan 2018
Posts: 20
Rep Power: 8
ThomasLong is on a distinguished road
Could you please offer me some advises on how to define alphaD and alphaDt in scalarTransport functionObject in controlDict? I have tried to define these two coefficients in the controlDict but they never worked
Quote:
Originally Posted by foamF View Post
Hi, everyone. I have a problem about the passive scalar function object in OpenFOAM.

I just did a simulation on a contact tank with OpenFOAM (v1712), using RANS kOmegaSST turbulent model to simulate the setup described in the paper "An Efficient Contact Tank Design for Potable Water Treatment", which can be downloaded in the following link:

https://www.google.com/url?sa=t&sour...-dGNtZusWSxxU7

First, I used pimpleFOAM (without passive scalar function object) to achieve a steady state. Then, to compute the RTD plot, I added the built-in passive scalar function object in controlDict to simulate the transient passive scalar transport.

My simulated flow field results (in the first simulation) agree well with the experiment results and the LES results in the paper. In my second simulation, I used the default settings of alphaD and alphaDt (default to be 1), the simulation results also fairly match with the LES results.

Up to now, it sounds not bad. But, the problem arises once I played with the settings of alphaD and alphaDt. To my understanding, alphaD is the reciprocal of Schmidt No. and alphaDt is the reciprocal Turbulent Schmidt No. I tried the following cases:

Case 1 - alphaD = 0.001 (Sc = 1,000) and alphaDt = 1.4286 (Sct = 0.7). The results changed a lot and got significant difference from the LES results.

Case 2 - alphaD = 1.4286 and alphaDt = 0.001. The result is not bad, it fairly agree with the LES results.

Case 3 - alphaD = alphaDt = 1.4286. The results is very close to the original cases (alphaD = alphaDt = default value 1).

The settings of alphaD and alphaDt in Case 1 is my target settings with reasonable physical meanings, but the results are bad. For the original case and case 3, the results are good but it appears not physically correct for Sc = Sct in water.

Any expert can provide me some hints?
ThomasLong is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 01:33.