# Unaffected Results with Parameter

**URL:** <https://community.freefem.org/t/unaffected-results-with-parameter/2497>\
**Category:** General Discussion\
**Created:** [May 26, 2023, 1:39pm UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497 "2023-05-26T13:39:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [May 26, 2023, 1:39pm UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497/1 "2023-05-26T13:39:31Z")

</div>

Hello ,  
I am surprised by the results of my 3d model. Its results remain unaffected for all values of parameters used in the model.  
[@prj@frederichecht]  
can anyone suggest/comment to resolve it?

===================================  
Also, an error is popping up for the plot:

> "plot: Sorry no ps version for such type of plot 6 "

=======================================  
My code for cubic enclosure with  
bottom surface hot,  
upper surface cold, and  
insulated for all other surfaces in Cubic enclosures are as follows:

[cubens.edp](https://community.freefem.org/uploads/short-url/avfLoKWQZxj7qgUJToCAsqOkiQE.edp) (3.2 KB)

===================================  
The mathematical model is as follows

continuity equation

> “\frac{\partial U}{\partial X} + \frac{\partial V}{\partial Y} + \frac{\partial W}{\partial Z} = 0”

X-directional momentum equation:

> “\begin{equation} \begin{split} \left( U\frac{\partial U}{\partial X} + V\frac{\partial U}{\partial Y} + W\frac{\partial U}{\partial Z} \right)& = - \frac{\partial P}{\partial X} + Pr\left( \frac{\partial^2 U}{\partial X^2} + \frac{\partial^2 U}{\partial Y^2} + \frac{\partial^2 U}{\partial Z^2} \right) \end{split} \end{equation}”

Y-directional momentum eqn

> “\begin{equation} \begin{split} \left( U\frac{\partial V}{\partial X} + V\frac{\partial V}{\partial Y} + W\frac{\partial V}{\partial Z} \right) =& -\frac{\partial P}{\partial Y} +Pr\left( \frac{\partial^2 V}{\partial X^2} + \frac{\partial^2 V}{\partial Y^2} + \frac{\partial^2 V}{\partial Z^2}\right) \\&- Ha^2 Pr V \end{split} \end{equation}”

> “ \begin{equation} \begin{split} \left( U\frac{\partial W}{\partial X} + V\frac{\partial W}{\partial Y} + W\frac{\partial W}{\partial Z} \right) =& -\frac{\rho\_{f}}{\rho\_{nf}} \frac{\partial P}{\partial Z} + Pr\left( \frac{\partial^2 W}{\partial X^2} + \frac{\partial^2 W}{\partial Y^2} + \frac{\partial^2 W}{\partial Z^2}\right)\\& +RaPr\theta - Ha^2PrW \end{split} \end{equation}”

> “ \begin{equation} U\frac{\partial \theta}{\partial X} + V\frac{\partial \theta}{\partial Y} + W\frac{\partial \theta}{\partial Z}= \left( \frac{\partial^2 \theta}{\partial X^2} + \frac{\partial^2 \theta}{\partial Y^2} + \frac{\partial^2 \theta}{\partial Z^2} \right) \end{equation}”

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 27, 2023, 9:55am UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497/2 "2023-05-27T09:55:20Z")

</div>

I played with this for a while but could not get it t converge as written  
or with some modifications. I did question your boundary conditions however.  
If this is supposed to be energy and momentum, did you want to set U to  
zero at top and bottom? Also you have a cNewton factor on eqn labelled x momentum  
which does not look right. I can’t really tell much however since I can’t get it  
to converge…

---

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [May 27, 2023, 10:41am UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497/3 "2023-05-27T10:41:39Z")

</div>

Hi @marchywka,  
this coupled equation ( momentum and energy) takes care of the continuity equation through the penalty FEM approach.  
Also, I have put velocity components zero at each surface due to the no-slip boundary conditions. In my case, it is converging but not affected by the value of the Rayleigh number.

 ![res3d](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/f/f20faec49af65d729734a6213b4a4fe1dbce0c20.png)

Also, changing boundary conditions show few noticeable changes in the iso-slice of temperature.

Could you please give me a few relevant portals to learn and implement such problems?

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 27, 2023, 12:23pm UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497/4 "2023-05-27T12:23:14Z")

</div>

Did you try plotting u\_z? Fluids isn’t really my thing but apparently the  
reynolds number involves the flow velocity and a transition to turbulent  
flow. If the veolocity is zero what will happen? You won’t really see much  
in any case until you approach a transition AFAICT.  
I guess you could try removing the boundariy conditions on u on the top  
or bottom or both and see what happens .

Still puzzled why it won’t converge on my fresh clean install…

---

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [May 27, 2023, 1:20pm UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497/5 "2023-05-27T13:20:49Z")

</div>

I have changed the boundary condition and parameter value, which works here:

=========================

> real Ra= 10^4;

Boundary conditions:

> on(1,2,3,4,5,6, u1=0, u2=0, u3=0)  
> + on(1, T=sin(pi\*y))+ on(3, T=1) ;

======= Results=======

# ![ra4d](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/7/73a598d4a01effc79ce07a71b26f142b153936f4.png)

However, could you please comment on identifying the orientation of a mesh as mentioned in [[3d labels questions](https://community.freefem.org/t/3d-labels-questions/2492)]?

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [May 27, 2023, 11:01pm UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497/6 "2023-05-27T23:01:48Z")

</div>

It looks like I was just running out ot memory so I changed the elements  
to P1 instead of P2. If you plot e3, your boundary conditions on surfaces 5 and 6  
create zero flow right? Reomve those and plot u3. With the reynolds number at  
1e8 i looks a lot different lol. Not sure any of this is right but if you are modelling  
flow along z I’m not sure you cant to set flow to zero at both ends.

I hacked up your code a lot there may be other changes …

---

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [May 28, 2023, 2:36am UTC](https://community.freefem.org/t/unaffected-results-with-parameter/2497/7 "2023-05-28T02:36:28Z")

</div>

Thanks, @marchywka for your kind suggestions. Also, I’ll go through it thoroughly.

I have one last doubt, could you please comment on identifying the direction of the axis for a mesh as mentioned in [[3d labels questions](https://community.freefem.org/t/3d-labels-questions/2492)]?
