<div dir="ltr"><div>Hi Paul,<br><br></div><div>It's not the boundary temperature what I'm trying to modify but a arbitrary zone inside the fluid domain. Boundary condition are 6 walls, 4 isolated and 2 with constant temperature, but that is already settled up.</div><div><br></div><div>After reading some entries on the mailing list I tried this</div><div><br></div><div>-----------------------------------------------------------------<br></div><div> subroutine userchk()<br> <br> include 'SIZE'<br> include 'TOTAL'<br> <br> real period,amplitude,perturb<br> real px1,px2,py1,py2<br> integer n<br></div><div><br></div><div> amplitude = 1.2<br></div><div> period = 0.75<br> perturb = amplitude * sin( (2.0*pi/period)*time )<br> <br> px1 = 0.25/2.0-0.05<br> px2 = 0.25/2.0+0.05<br> pz1 = 0.5-0.1<br> pz2 = 0.5+0.1<br><br> n = lx1*ly1*lz1*nelt<br><br> do i=1,n<br> x=xm1(i,1,1,1)<br> y=ym1(i,1,1,1)<br> z=zm1(i,1,1,1)<br><br> if(x.ge.px1.and.x.le.px2)then<br> if(z.ge.pz1.and.z.le.pz2)then<br>(1) temp = temp + perturb ! Nothing happens<br>(2) t = t + perturb ! WARNING: DIV(V)-QTL too large!<br> endif<br> endif<br> end do<br><br> return<br> end</div><div>-----------------------------------------------------------------<br></div><div><br></div><div>After running the simulations, with (1) I get the same results that without it; with (2) the solver indicates "WARNING: DIV(V)-QTL too large!" in every timestep, makes some really small timesteps (1e-5 sec. vs 1e-2) and doesn't seem to converge.</div><div><br></div><div>I guess that the addition of the perturbation is bad defined.</div><div><br></div><div><br></div><div><br></div><div>Nicolás<br></div><div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>Nicolás Andrés Órdenes Leiva</b><div><b><br></b><div><div>Estudiante de Ingeniería Civil Mecánica</div><div>Universidad Técnica Federico Santa María</div><div>Tel: +56 9 7619 2857</div></div></div></div></div></div>
<br><div class="gmail_quote">2018-05-14 19:15 GMT-04:00 <span dir="ltr"><<a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_5052566157451557509divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Dear Nicolas,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">For time-dependent boundary conditions, you could</p>
<p style="margin-top:0;margin-bottom:0">use something like the expression you have in your email.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">You would need "t " ( "tee" space space) for the thermal</p>
<p style="margin-top:0;margin-bottom:0">boundary conditions in your .rea or .box file.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Please let me know if this solves your problem.</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>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_5052566157451557509divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Nek5000-users <<a href="mailto:nek5000-users-bounces@lists.mcs.anl.gov" target="_blank">nek5000-users-bounces@lists.<wbr>mcs.anl.gov</a>> on behalf of <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.<wbr>gov</a> <<a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.<wbr>gov</a>><br>
<b>Sent:</b> Monday, May 14, 2018 5:26:23 PM<br>
<b>To:</b> <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
<b>Subject:</b> [Nek5000-users] Temperature Perturbation Zone</font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>I'm setting a 3D box to perform natural convection problems in a closed cavity. After trying several method i can't manage to define a zone with a variable temperature perturbation in the usrchk() routine.<br>
</div>
<div><br>
</div>
<div>Let's say, that temp = temp + A*sin(w*time) in a square of boundaries [x_min, x_max] x [y_min, y_max] x [z_min, z_max] for x, y, z.</div>
<div><br>
</div>
<div>Any advice for implementing this?<br>
</div>
<div><br>
</div>
<div>Regards,<br>
</div>
<div><br>
</div>
<div>
<div>
<div class="m_5052566157451557509x_gmail_signature">
<div dir="ltr"><b>Nicolás Andrés Órdenes Leiva</b>
<div><b><br>
</b>
<div>
<div>Estudiante de Ingeniería Civil Mecánica</div>
<div>Universidad Técnica Federico Santa María</div>
<div>Tel: +56 9 7619 2857</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
<br>______________________________<wbr>_________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.<wbr>gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/<wbr>mailman/listinfo/nek5000-users</a><br>
<br></blockquote></div><br></div>