Skip to content

Reply To: Natural convection in square cavity : trouble with the discretization

Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum please send a message via our contact form.

Forums OpenLB General Topics Natural convection in square cavity : trouble with the discretization Reply To: Natural convection in square cavity : trouble with the discretization

#8863
shota
Participant

Dear Hervé Mutelle,

in the squareCavity2d example the wall is a simple straight wall. In this case, you can define your own AnalyticalFunctor to prescribe a function for the temperature depending on the position.
Please refer to the example/advectionDiffusionReaction/convectedPlate3d. There a custom AnalyticalFunctor with the name ConvPlate3D which computes the analytical solution as a function of the spatial coordinates. This is done by the operator() function taking the spatial coordinates via input[] and passes the results via output[].
Using the same technique you can define a function for the wall and pass that functor to initEquilibrium and defineRho for the material numbers of the wall.

Hope this helps.

Best wishes,
Shota