<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><style style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style><style style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style></div><div>Sorry again and my last question is, Finally I want to use a Naca profile, So the deltap = 2* delta would be still valid ? Or I have to use anyother scaling information?<br></div><div><br data-mce-bogus="1"></div><div>regards<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Sijo GEORGE<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"nek5000-users" <nek5000-users@lists.mcs.anl.gov><br><b>À: </b>"nek5000-users" <nek5000-users@lists.mcs.anl.gov><br><b>Envoyé: </b>Lundi 27 Novembre 2017 16:54:55<br><b>Objet: </b>Re: [Nek5000-users] mesh deformation<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div></div><div>Thanks you. But I am sorry I was not able to follow your answer. But could you please tell me that,<br></div><div>if i write like this<br></div><div>n = nx1*ny1*nz1*nelv<br></div><br><div>do i=1,n<br></div><div> v = volume(i,1,1,1)<br></div><div> x = xm1(i,1,1,1,)<br></div><div>enddo<br></div><div>the volume which gives corresponding the elements which has the position of x. </div><br><br><div>Regars<br></div><br><div>Sijo GEORGE<br></div><br><hr id="zwchr"><div><b>De: </b>"nek5000-users" <nek5000-users@lists.mcs.anl.gov><br><b>À: </b>"nek5000-users" <nek5000-users@lists.mcs.anl.gov><br><b>Envoyé: </b>Lundi 27 Novembre 2017 16:35:03<br><b>Objet: </b>Re: [Nek5000-users] mesh deformation<br></div><br><div>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Dear Sijo,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">There's no reason to have h1 uniform in each element,</p>
<p style="margin-top:0;margin-bottom:0">so I did not bother to do that. In the SEM we usually view</p>
<p style="margin-top:0;margin-bottom:0">fields as a continuum and rarely concern with element-to-element</p>
<p style="margin-top:0;margin-bottom:0">variations as those would then depend on the mesh itself.</p>
<p style="margin-top:0;margin-bottom:0">There is no hard and fast rule here, save that you probably want</p>
<p style="margin-top:0;margin-bottom:0">the mesh deformation to be smooth within each element.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">hth,</p>
<p style="margin-top:0;margin-bottom:0">Paul</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
<hr style="display:inline-block;width:98%">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-size: 11pt; color: #000000; font-family: Calibri,sans-serif;"><b>From:</b> Nek5000-users <nek5000-users-bounces@lists.mcs.anl.gov> on behalf of nek5000-users@lists.mcs.anl.gov <nek5000-users@lists.mcs.anl.gov><br>
<b>Sent:</b> Monday, November 27, 2017 9:17:26 AM<br>
<b>To:</b> nek5000-users<br>
<b>Subject:</b> Re: [Nek5000-users] mesh deformation</span>
<div> </div>
</div>
<div>
<div style="font-family:arial,helvetica,sans-serif; font-size:12pt; color:#000000">
<div>Thanks Paul thank you very much. I could understand the things what you mentioend about the laplace equation since I have read your publication reagrding moving boundary and ALE formulation. I am gonna try it on my FSI problem with 2D single cylinder.
Since its been some time I had also developed a code which pushes the most of the deformation to the outer region: Here it is:<br>
</div>
<div><br>
</div>
<div> v = volume(1,1,1,1)<br>
<br>
a=glmax(v,1)<br>
b=glmin(v,1)<br>
<br>
L = 1 <br>
do i=1,n <br>
vdiv = b/a<br>
num = 1-vidv<br>
denom = 1/a<br>
h1(i) = h1(i) + ((1- (b/a) **L ) / (( denom * v ) **L))<br>
enddo<br>
</div>
<div><br>
</div>
<div>which also works same as like you have created (I have only verified visually). But I have some questions regarding this:
<br>
</div>
<div>Before my doubts I have to be clear on one thing. Here I will be talking about two different elements. First one is Elements (lets say I have 1348 elements in my domain) and Second is Spectral elements (6*6*1348=48528) where nx1 = 6.<br>
</div>
<div><br>
</div>
<div>1) Since the loop runs from 1 to n, the blending coefficient also makes h1 for all speactral elements right?<br>
</div>
<div><br>
</div>
<div>2) In that case, my blending coefficient is uniform across a particular Element of the domain? more specifically lets say my element number is 1A and in 1A there are 36 spectral elements of different size. As per my code above, is my blending coefficient
same for all the spectral elements which is inside 1A element?or is it different?(because I consider the volume of each element as "v")
<br>
</div>
<div><br>
</div>
<div>My idea was to give different h1 coefficient for each Elements and give constant h1 to spectral elements in each elements. More precisily lets sat there are 2 elements called 1A and 1B.
<br>
</div>
<div><br>
</div>
<div>1A has a h1 = 2.0 so all the spectral elements in the 1A has h1 of 2.0<br>
</div>
<div><br>
</div>
<div>and <br>
</div>
<div><br>
</div>
<div>1 B has h1 = 10.0 so all the spectral elements in the 1B has h1 of 10.0<br>
</div>
<div><br>
</div>
<div>I know its a quite big email. Even though could you please correct me if I am wrong. Because gradually I am going to run a very complex problem. So I Have to be sure in these cases before starting it.<br>
</div>
<div><br>
</div>
<div>Thanks with regards<br>
</div>
<div><br>
</div>
<div>Sijo George<br>
</div>
<hr id="x_zwchr">
<div><b>De: </b>"nek5000-users" <nek5000-users@lists.mcs.anl.gov><br>
<b>À: </b>"nek5000-users" <nek5000-users@lists.mcs.anl.gov><br>
<b>Envoyé: </b>Lundi 27 Novembre 2017 15:47:35<br>
<b>Objet: </b>Re: [Nek5000-users] mesh deformation<br>
</div>
<div><br>
</div>
<div>
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,'Apple Color Emoji','Segoe UI Emoji',NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols">
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Dear Sijo,</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">In the ocyl2 case, the delta is based on a dimension that</p>
<p style="margin-top:0; margin-bottom:0">is related to the model. (Here, delta=2*D, where D=1 is</p>
<p style="margin-top:0; margin-bottom:0">the diameter of the cylinder.)</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Such a choice would be reasonable for all flow past a cylinder</p>
<p style="margin-top:0; margin-bottom:0">cases for that particular geometry, independent of the mesh</p>
<p style="margin-top:0; margin-bottom:0">resolution.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">The boundary-layer thickness criterion is important when there</p>
<p style="margin-top:0; margin-bottom:0">are multiple objects that are potentially touching.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Keep in mind that any of these choices are moderated by the</p>
<p style="margin-top:0; margin-bottom:0">fact that we are simply computing a blending function that is</p>
<p style="margin-top:0; margin-bottom:0">the solution to the (modified) Laplace equation. It will have</p>
<p style="margin-top:0; margin-bottom:0">more or less the correct shape --- even the unmodified Laplace</p>
<p style="margin-top:0; margin-bottom:0">solution is not a terrible blending function. The modification is</p>
<p style="margin-top:0; margin-bottom:0">designed simply to help preserve mesh sizes near boundaries.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">I paste below a snippet of code that computes the average </p>
<p style="margin-top:0; margin-bottom:0">thickness of elements near the moving wall.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Paul</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier; min-height:16px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
integer e,f</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier; min-height:16px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
nxz = nx1*nz1</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
nxyz = nx1*ny1*nz1</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
n = nxyz*nelv</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier; min-height:16px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
srfbl = 0. ! Surface area of elements in b.l.</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
volbl = 0. ! Volume of elements in boundary layer</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
do e=1,nelv</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
do f=1,nface</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
if (cbc(f,e,1).eq.'mv ') then</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
srfbl = srfbl + vlsum(area(1,1,f,e),nxz )</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
volbl = volbl + vlsum(bm1 (1,1,1,e),nxyz)</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
endif</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
enddo</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
enddo</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
srfbl = glsum(srfbl,1) ! Sum over all processors</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
volbl = glsum(volbl,1)</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier; min-height:16px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
delta = volbl / srfbl ! Avg thickness of b.l. elements</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier; min-height:16px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
call rone (h1,n)</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
call rzero(h2,n)</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
call cheap_dist(d,1,'mv ')</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier; min-height:16px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
deltap = 2*delta ! Protected b.l. thickness</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
do i=1,n</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
arg = -(d(i)/deltap)**2</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
h1(i) = h1(i) + 9*exp(arg)</p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier">
enddo</p>
<p></p>
<p style="margin-right:0px; margin-left:0px; font-size:13px; line-height:normal; font-family:Courier; min-height:16px">
<br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<br>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><span style="font-size:11pt; color:#000000; font-family:Calibri,sans-serif"><b>From:</b> Nek5000-users <nek5000-users-bounces@lists.mcs.anl.gov> on behalf of nek5000-users@lists.mcs.anl.gov
<nek5000-users@lists.mcs.anl.gov><br>
<b>Sent:</b> Monday, November 27, 2017 7:52 AM<br>
<b>To:</b> nek5000-users<br>
<b>Subject:</b> [Nek5000-users] mesh deformation</span>
<div> </div>
</div>
<div>
<div style="font-family:arial,helvetica,sans-serif; font-size:12pt; color:#000000">
<div>
<div>
<div>
<div style="font-family:arial,helvetica,sans-serif; font-size:12pt; color:#000000">
<div>
<div>
<div>
<div style="font-family:arial,helvetica,sans-serif; font-size:12pt; color:#000000">
<div>Hello Nek,</div>
<div><br>
</div>
<div> I was trying to validate moving cylinder test cases (ocyl2.usr more specifically). I could validate it properly. Even though I have some doubts regarding the mesh motion. Mesh deformation more precisely. I have seen a function to send the deformation
to far field apart from the near wall region (Laplace equation with h1 as blending coefficient).So in order to find h1 in the equation there is a parameter called delta (which is 2 in this case). I have also read a paper regarding this equation. In that paper
its clearly states that it is the average thickness of the element which is close to the object. So my question is, is there anyway to calculate it automatically or easily to calculate the thickness of that particular elements from any input files? because
if I change the mesh (suppose if I refine the mesh size everything will change right?) how can I find the new average thickness of the elements which is close to the object? or how can I measure the area or volume of the elements which is close to the wall.
so could you please help me with this?</div>
<div><br>
</div>
<div>Thanks with regards</div>
<div><br>
</div>
<div>Sijo George</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Nek5000-users mailing list<br>
Nek5000-users@lists.mcs.anl.gov<br>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users<br>
</div>
</div>
</div>
<br>_______________________________________________<br>Nek5000-users mailing list<br>Nek5000-users@lists.mcs.anl.gov<br>https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users<br></div></div><br>_______________________________________________<br>Nek5000-users mailing list<br>Nek5000-users@lists.mcs.anl.gov<br>https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users<br></div></div></body></html>