Linear Temperature distribution on walls
› Forums › OpenLB › General Topics › Linear Temperature distribution on walls
- This topic has 3 replies, 2 voices, and was last updated 3 years, 3 months ago by stephan.
-
AuthorPosts
-
August 23, 2022 at 9:49 am #6774sahilbhapkar30Participant
Hello,
I am trying to get a linearised temperature distribution on wall.
Could anyone help me in the implementation?Thankyou
August 24, 2022 at 8:47 am #6777stephanModeratorDear sahilbhapkar30,
could you please provide a bit more detail to your question?
BR
stephanAugust 24, 2022 at 5:55 pm #6778sahilbhapkar30ParticipantHello,
I am considering a case where I have a rectangle geometry. The left vertical wall is kept at 278K, while the right vertical wall is kept at 318K. This wall temperature I am setting using setAdvectionDiffusion Temperature boundary. Now, for the horizontal wall, I want to have linearized temperature distribution in the horizontal direction such that the temperature on the wall would be a function of the distance. At x=0,it would be 278K, at x=L/2 it would be 298K and x =L it should be 318K.
In addition, I also want to know how the temperature non-dimensional conversion is done. In the previous blogs, I read that the Thot is set to 1 in non-dimensional units, while the Tcold is set to 0. Is it set this way?
I hope that you are able to understand the question
Thank-you.
Best regards,
SahilAugust 26, 2022 at 10:59 am #6779stephanModeratorDear Sahil,
regarding your first question, please specify the function as an analytical functor (e.g. AnalyticalLinear3D) and pass it to the boundary condition (depending on what arguments it requires). You can find this procedure in basically any example at some point.
For detailed conversion rules please have a look at the file src/core/thermalUnitConverter.h:
– l.75: The conversion factor for temperature is computed via: (charPhysHighTemperature – charPhysLowTemperature). You set these two values in physical units at the beginning of your simulation. In your case these could be 278K and 318K.
– l.144 onwards: The converter uses the conversion factor for temperature to compute a lattice value of a given physical temperature in this way: (physTemperature – charPhysLowTemperature) / _conversionTemperature + 0.5; and eventually a typecast. Hence, according to this rule, the converter converts charPhysHighTemperature to 1 and charPhysLowTemperature to 0.
– In case you assign your appearing wall temperatures to these two values (in physical units!), respectively, the answer to your second question is yes.BR
stephan -
AuthorPosts
- You must be logged in to reply to this topic.
