|
[Sponsors] |
Surface normal temperature gradient during simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 25, 2019, 10:03 |
Surface normal temperature gradient during simulation
|
#1 |
New Member
Join Date: Sep 2018
Posts: 9
Rep Power: 8 |
Hi,
I am trying to model auto-ignition due to hot surfaces and have run into a challenge. Looking at the theory of hot surface ignition the Van't Hoff criterion comes up. The criterion states that when the fluid is ignited due to being heated by the surface, the temperature gradient from the wall is equal to 0. I want to add a CEL expression that calculates the surface normal temperature gradient at each boundary mesh node then add another CEL If-statement that does "XYZ" if the gradient from one of the mesh nodes becomes roughly 0. The gradients and the If-statement would have to be calculated/checked every time step. I have looked at at the CEL language, but I am not sure if the predefined functions does what I want them to and I am obviously not the biggest CEL expert... Hopefully someone know how to do this. Thanks in advance |
|
October 25, 2019, 15:25 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Is your flow turbulent or laminar?
The temperature gradient only makes sense for laminar flows. Computing the temperature gradient for wall functions is not trivial |
|
October 25, 2019, 17:19 |
|
#3 |
New Member
Join Date: Sep 2018
Posts: 9
Rep Power: 8 |
Thanks for the reply. It is turbulent, that is why I don't know how to do it.
Using Shear stress transport turbulence model, which has the blending wall function. |
|
October 25, 2019, 20:15 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Then you need to get the normal gradient from the wall function (if in that regime) or you can calculate it directly (if in the integrate to the wall regime). Look at the documentation for details on the wall functions.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
October 28, 2019, 05:51 |
|
#5 |
New Member
Join Date: Sep 2018
Posts: 9
Rep Power: 8 |
Thank you for the answer.
If I am using the "automatic near-wall treatment" and my mesh is refined to y+=1 with a low to moderate growth ratio on the walls of interest, I should be in the "integrate to the wall regime". Can I just do something like: Tgrad = (Wall Heat Flux [W m^-2])@Hotwall/Thermal Conductivity [kg m s^-3 K^-1]? Would this calculate the temperature gradient from at each boundary mesh node into the domain, and can it be used to iteratively check Van't Hoff at each mesh boundary mesh node? An example of the direct calculation of the temperature gradient would really help me out, as I am more or less clueless about CEL. |
|
October 28, 2019, 17:05 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Your function looks reasonable providing you are integrating to the wall. Note the automatic wall functions blends the wall functions out over a range of y+ - I don't recall where the blending ends, so you might have a bit of wall functions in there. You would have to check.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
November 13, 2019, 04:51 |
|
#7 |
New Member
Join Date: Sep 2018
Posts: 9
Rep Power: 8 |
Hi Glenn, thank you again for taking the time to help so many people on the forum.
Regarding the temperature gradient it is calculated correctly (using SST automatic wall treatment and having sufficient resolution near wall) by just using: Tgrad=Wall Heat Flux/Thermal Conductivity. Now as you often do I ran into another issue. I'm trying to use the Knock auto ignition model and using the value of Tgrad to define a custom Ignition delay time. Using the following expression: IgnitionTimeDelay=if(Tgrad<0.0001[K m^-1],"Correlation value"[s],"Very large value"[s]) This makes sure that ignition only happens when the Temperature gradient is close to 0 eg. when Van't Hoff is "ture". The issue is when Tgrad is defined using variables only defined at the wall (Wall Heat Flux/Wall Adjacent Temperature/Wall Distance) the simulation won't run and returns the following error message: Details of error:- ---------------- Error detected by routine MAKDAT CDANAM = LVAR CDTYPE = INTR ISIZE = 845 CRESLT = OLD Current Directory : /FLOW/ALGORITHM/ZN1/SYSTEM/VARIABLES I have tried using expressions like: Tgrad=(Twall - Wall Adjacent Temperature)/Wall Distance However if i just use something like Tgrad=Temperature (ofc adjusting units where necessary) The model starts iterating no problem. My guess to why this is happening is that the "Wall" variables are only defined and saved on the wall and thus are undefined in the rest of the domain. Since the ignition time delay is a domain variable the solver has to check it for every cell and ends up trying to evaluate the expression using undefined variables. Is this observation correct and is there a workaround to this issue? Last edited by Bjørn; November 13, 2019 at 06:59. |
|
November 13, 2019, 05:51 |
|
#8 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
I would have to see that error message in the output file to see its context. Can you attach the output file?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
November 13, 2019, 11:07 |
|
#9 |
New Member
Join Date: Sep 2018
Posts: 9
Rep Power: 8 |
I am unfortunately not allowed to....
I can paste a bit more of the .out file and hopefully that is enough. If not I totally understand and thanks for giving it a try! For the specific simulation (which is a rough test case) Tgrad was calculated like: Tgrad = (1200[K] - Wall Adjacent Temperature)/Wall Distance. Where the 1200 K is the temperature set on the wall. You probably know the layout of the .out file fairly well. Prior to the following pasted segment is the Mesh Statistics. +--------------------------------------------------------------------+ | Reference Pressure Information | +--------------------------------------------------------------------+ Domain Group: Default Domain This is a transient run with at least one compressible fluid and no boundary pressure set. The pressure level is set through the transient term in the continuity equation. To accelerate convergence, the pressure level will also be shifted dynamically to satisfy global mass conservation. Domain Group: Default Domain Buoyancy has been activated. The absolute pressure will include hydrostatic pressure contribution, using the following reference coordinates: (-5.00000E-02, 8.00000E-02, 1.00000E-01). ---------------------------------- Error in subroutine get_TNW : Error calculating Wall Adjacent Temperature GETVAR originally called by subroutine get_AUTOIGN +--------------------------------------------------------------------+ | Writing crash recovery file | +--------------------------------------------------------------------+ Details of error:- ---------------- Error detected by routine MAKDAT CDANAM = LVAR CDTYPE = INTR ISIZE = 845 CRESLT = OLD Current Directory : /FLOW/ALGORITHM/ZN1/SYSTEM/VARIABLES +--------------------------------------------------------------------+ | An error has occurred in cfx5solve: | | | | The ANSYS CFX solver exited with return code 1. No results file | | has been created. | +--------------------------------------------------------------------+ End of solution stage. |
|
November 13, 2019, 17:14 |
|
#10 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
The error is actually reported in the block just above your error message you posted first time. Do you have user fortran "get_TNW" and "get_AUTOIGN"? You appear to be getting the Wall Adjacent Temperature in these routines. I suspect you will find that you are getting it for the entire domain but it only exists at the boundary.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
November 13, 2019, 17:35 |
|
#11 |
New Member
Join Date: Sep 2018
Posts: 9
Rep Power: 8 |
My guess might not be too far off then.
Both the Wall Adjacent Temperature and the Wall Distance are predefined variables in CEL. It probably uses fortran, but not anything I have added. It seems you cannot use the "wall" variables to control a domain variable, as the domain expression will only make sense on the walls... Is there a work around to this? |
|
November 13, 2019, 17:48 |
|
#12 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
I do not know of any work around. If you want to apply this to the domain then you need to find a way of getting the gradient in the domain. Temperature.grad (x/y/z) is an obvious one, but it only easy to apply if the direction is easy to define.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
How to monitor surface temperature during transient simulation? | Oula | FLUENT | 4 | November 2, 2018 05:31 |
surface tension as function of normal gradient | tom | FLUENT | 2 | September 7, 2016 04:48 |
unexpected constant Temperature on a clip surface | Sungki | OpenFOAM Running, Solving & CFD | 0 | August 4, 2015 05:50 |
temperature gradient for use in surface monitor | Catherine | FLUENT | 1 | August 24, 2012 10:10 |