|
[Sponsors] |
Passive Scalar Function Object - Setting of alphaD and alphaDt |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 21, 2019, 06:00 |
Passive Scalar Function Object - Setting of alphaD and alphaDt
|
#1 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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? |
|
January 22, 2019, 04:53 |
|
#2 |
Senior Member
|
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 |
|
January 22, 2019, 07:54 |
|
#3 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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? |
|
January 22, 2019, 08:39 |
|
#4 |
Senior Member
|
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 |
|
January 25, 2019, 00:36 |
|
#5 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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. |
|
August 3, 2019, 07:00 |
|
#6 |
New Member
Paul S
Join Date: Mar 2018
Posts: 11
Rep Power: 8 |
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 11:24. |
|
August 5, 2019, 13:02 |
|
#7 |
Member
Join Date: Aug 2018
Posts: 47
Rep Power: 8 |
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. |
|
August 8, 2019, 14:39 |
|
#8 |
New Member
Paul S
Join Date: Mar 2018
Posts: 11
Rep Power: 8 |
So I select cells on the outlet, data analysis -> Integrate variables, data analysis -> plot selection over time
|
|
June 10, 2020, 18:14 |
|
#9 |
New Member
Chihuahua
Join Date: Jun 2020
Posts: 2
Rep Power: 0 |
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 |
|
June 11, 2020, 05:44 |
|
#10 |
Senior Member
|
Please have a look at the online Source Guides:
OpenFOAM 7 OpenFOAM v1912 (or later) This is usually the most up to date information. |
|
June 11, 2020, 14:11 |
|
#11 |
New Member
Chihuahua
Join Date: Jun 2020
Posts: 2
Rep Power: 0 |
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 |
|
June 12, 2020, 04:47 |
|
#12 |
Senior Member
|
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; } |
|
October 13, 2022, 05:45 |
|
#13 | |
New Member
Thomas Shi
Join Date: Jan 2018
Posts: 20
Rep Power: 8 |
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:
|
||
|
|