<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi Neks, <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I'm having a problem with the computation of my pressure. I am simulating a flow past an airfoil. I'm using user defined velocity bounday condition at the inlet (set as 'v'), and zero gradient at the outlet.<br data-mce-bogus="1"></div><div>I implemented a von Karman isotropic turbulence model at the inlet of my domain, on which I impose in the userbc U+u', v' and w'(flow in x direction). The model gives correct description of the perturbation , spatially and in time.<br data-mce-bogus="1"></div><div>With constant velocity the problem works fine, but when I add the fluctuation, the local pressure becomes randomed and jump from a value to another with no correlation at all. The velocities look just fine in all cases.<br data-mce-bogus="1"></div><div data-mce-bogus="1">I tried to use <span class="Apple-tab-span" style="white-space: pre;" data-mce-style="white-space: pre;"></span>call dsavg(u) to ensure I am C0-continuous, but it didn't work i.e. I guess I am already, and since I use only one random number to generate my von Karman spectra, there is no reason not to be, at least spatially. </div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1">I have more doubts about my time correlation, where I use a basic asymmetric time filter that seems to induce quite random behavior near low amplitudes fluctuations. <br></div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1">Some time ago, I also had the same problem by setting a random noise at the inlet.</div><div data-mce-bogus="1"> I also tried to tighten the convergence by decreasing p21(10e-8,10e-9, 10e-10..) in the rea but it have no effect at all.<br></div><div data-mce-bogus="1">I also checked my model with flow past a flat plate and it gives similar problem.<br data-mce-bogus="1"></div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1">after calling the subroutine in usechk, I just add the fluctuation writing ux=U+utm(ix,iy,iz,e), uy= .... in userbc<br data-mce-bogus="1"></div><div data-mce-bogus="1"><pre>Any comments will be very much appreciated and thank you in advance.<br><br><br>Antoine<br></pre></div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1">PS: Below is my parameters in the rea file, and a part of the userbc in case there is something I missed...<br data-mce-bogus="1"></div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1"> ****** PARAMETERS *****<br> 2.6099999 NEKTON VERSION<br> 3 DIMENSIONAL RUN<br> 118 PARAMETERS FOLLOW<br> 1.0000 p001 DENSITY<br> 0.000001 p002 VISCOS<br> 0.00000 p003<br> 0.00000 p004<br> 0.00000 p005<br> 0.00000 p006<br> 1.00000 p007 RHOCP<br> 1.00000 p008 CONDUCT<br> 0.00000 p009<br> 000000.00000 p010 FINTIME<br> 0100.000 p011 NSTEPS<br> 2500.00000 p012 DT<br> 0.00000 p013 IOCOMM<br> 00000.00000 p014 IOTIME<br> 00000025.00 p015 IOSTEP<br> 0.00000 p016 PSSOLVER: 0=default<br> 0.00000 p017<br> 0.500000 p018 GRID < 0 --> # cells on screen<br> -1.00000 p019 INTYPE<br> 10.0000 p020 NORDER<br> 0.100000E-08 p021 DIVERGENCE<br> 0.100000E-07 p022 HELMHOLTZ<br> 0.00000 p023 NPSCAL<br> 0.100000E-01 p024 TOLREL<br> 0.100000E-01 p025 TOLABS<br> 0.600000 p026 COURANT/NTAU<br> 3.00000 p027 TORDER<br> 0.00000 p028 TORDER: mesh velocity (0: p28=p27)<br> 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0<br> 0.00000 p030 > 0 ==> properties set in uservp()<br> 0.00000 p031 NPERT: #perturbation modes<br> 0.00000 p032 #BCs in re2 file, if > 0<br> 0.00000 p033<br> 0.00000 p034<br> 0.00000 p035<br> 0.00000 p036<br> 0.00000 p037<br> 0.00000 p038<br> 0.00000 p039<br> 0.00000 p040<br> 0.00000 p041 1-->multiplicative SEMG<br> 0.00000 p042 0=gmres/1=pcg<br> 1.00000 p043 0=semg/1=schwarz<br> 0.00000 p044 0=E-based/1=A-based prec.<br> 0.00000 p045 Relaxation factor for DTFS<br> 0.00000 p046 reserved<br> 0.00000 p047 vnu: mesh matieral prop.<br> 0.00000 p048<br> 0.00000 p049<br> 0.00000 p050<br> 0.00000 p051<br> 0.00000 p052 IOHIS<br> 0.00000 p053<br> 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z<br> 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0)<br> 0.00000 p056<br> 0.00000 p057<br> 0.00000 p058<br> 0.00000 p059 !=0 --> full Jac. eval. for each el.<br> 0.00000 p060 !=0 --> init. velocity to small nonzero<br> 0.00000 p061<br> 0.00000 p062 >0 --> force byte_swap for output<br> 0.00000 p063 =8 --> force 8-byte output<br> 0.00000 p064 =1 --> perturbation restart<br> 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs<br> 6.00000 p066 output : <0=ascii, else binary<br> 6.00000 p067 restart: <0=ascii, else binary<br> 0.00000 p068 iastep: freq for avg_all (0=iostep)<br> 0.00000 p069<br> 0.00000 p070<br> 0.00000 p071<br> 0.00000 p072<br> 0.00000 p073<br> 0.00000 p074 verbose Helmholtz<br> 0.00000 p075<br> 0.00000 p076<br> 0.00000 p077<br> 0.00000 p078<br> 0.00000 p079<br> 0.00000 p080<br> 0.00000 p081<br> 0.00000 p082<br> 0.00000 p083<br> 0.00000 p084 !=0 --> sets initial timestep if p12>0<br> 0.00000 p085 dt ratio if p84 !=0, for timesteps>0<br> 0.00000 p086 reserved<br> 0.00000 p087<br> 0.00000 p088<br> 0.00000 p089 p89 reserved<br> 0.00000 p090<br> 0.00000 p091<br> 0.00000 p092<br> 20.0000 p093 Number of previous pressure solns saved<br> 5.00000 p094 start projecting velocity after p94 step<br> 5.00000 p095 start projecting pressure after p95 step<br> 1.00000 p096 p96 u0 translational velocity (in<br> 0.300000 p097 p97 v0 translational velocity (i<br> 0.00000 p098<br> 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new<br> 0.00000 p100<br> 0.00000 p101 Number of additional modes to filter<br> 0.00000 p102 Dump out divergence at each time step<br> 0.00000 p103 weight of stabilizing filter (.01)<br> 0.00000 p104<br> 0.00000 p105<br> 0.00000 p106<br> 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn<br> 0.00000 p108<br> 0.00000 p109<br> 0.00000 p110<br> 0.00000 p111<br> 0.00000 p112<br> 0.00000 p113<br> 0.00000 p114<br> 0.00000 p115<br> 0.00000 p116 !=0: x elements for fast tensor product<br> 0.00000 p117 !=0: y elements for fast tensor product<br> 0.00000 p118 !=0: z elements for fast tensor product<br> 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP<br> 1.00000 1.00000 1.00000 1.00000 1.00000<br> 1.00000 1.00000 1.00000 1.00000<br> 1.00000 1.00000 1.00000 1.00000 1.00000<br> 1.00000 1.00000 1.00000 1.00000<br> 13 LOGICAL SWITCHES FOLLOW<br> T IFFLOW<br> F IFHEAT<br> T IFTRAN<br> T F F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields)<br> F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh)<br> F IFAXIS<br> F IFSTRS<br> F IFSPLIT<br> F IFMGRID<br> F IFMODEL<br> F IFKEPS<br> F IFMVBD<br> F IFCHAR</div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1">----------------------------------<br data-mce-bogus="1"></div><div data-mce-bogus="1"> subroutine userbc (ix,iy,iz,iside,eg)<br> include 'SIZE'<br> include 'TOTAL'<br> include 'NEKUSE'<br> integer e,eg<br><br> common /myturb/ utm(lx1,ly1,lz1,lelt),vtm(lx1,ly1,lz1,lelt), ! my fluctuations<br> $ wtm(lx1,ly1,lz1,lelt)<br> e=gllel(eg)<br>...<br> <br> uy=vtm(ix,iy,iz,e)<br> ux =1.0+utm(ix,iy,iz,e)<br> uz=wtm(ix,iy,iz,e)<br> <br></div><div data-mce-bogus="1">...<br data-mce-bogus="1"></div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1"><br data-mce-bogus="1"></div><div data-mce-bogus="1"><br data-mce-bogus="1"></div></div></body></html>