<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_quote"><div dir="ltr"><div><div><font face="monospace, monospace">Hello,</font></div><div><font face="monospace, monospace">I have no experience with freefem whatsoever and wanted to</font></div><div><font face="monospace, monospace">quickly test a simple flow scenario, such as a channel flow</font></div><div><font face="monospace, monospace">in a unit square.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Flow scenario:</font></div><div><font face="monospace, monospace">==============</font></div><div><font face="monospace, monospace">// Navier Stokes Poiseuille flow on the unit square ([0-1]x[0-1])</font></div><div><font face="monospace, monospace">//</font></div><div><font face="monospace, monospace">// v1,v2=0</font></div><div><font face="monospace, monospace">// --------------</font></div><div><font face="monospace, monospace">// Parapolic ->| |</font></div><div><font face="monospace, monospace">// velocity -->| |</font></div><div><font face="monospace, monospace">// profile --->| | Velo nodes on the outflow boundary are treated as inner nodes ("do nothing").</font></div><div><font face="monospace, monospace">// Umax=1 -->| | Pressure nodes on the outflow boundary are forced to have a zero pressure value at the end</font></div><div><font face="monospace, monospace">// ->| |</font></div><div><font face="monospace, monospace">// --------------</font></div><div><font face="monospace, monospace">// v1,v2=0</font></div><div><font face="monospace, monospace">//</font></div><div><font face="monospace, monospace">// Analytical solution of the Poiseuille Flow given by:</font></div><div><font face="monospace, monospace">// Parapolic velocity profile:</font></div><div><font face="monospace, monospace">// v1 = 4 * Umax * y * (H - y) / H^2 = 4 * Umax * y * (1 - y) (with height H = 1)</font></div><div><font face="monospace, monospace">// v2 = 0</font></div><div><font face="monospace, monospace">// p = (8 - 8x) * nu (with nu = 1)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">For the above test, I have</font></div><div><font face="monospace, monospace"> 1) exchanged the geometry of example</font></div><div><font face="monospace, monospace"> 'ff++/examples++-chapt3/<wbr>NSNewton.edp' with the unit square,</font></div><div><font face="monospace, monospace"> 2) modified the initial guess for velocity to reflect the parabolic profile,</font></div><div><font face="monospace, monospace"> 3) modified the essential boundary conditions to</font></div><div><font face="monospace, monospace"> + on( inflow, du1 = v1Inflow( x, y, 0 ), du2 = 0 )</font></div><div><font face="monospace, monospace"> + on( outflow, dp = 0 )</font></div><div><font face="monospace, monospace"> + on( noflow, du1 = 0, du2 = 0 ) and</font></div><div><font face="monospace, monospace"> 4) removed the modification of the viscosity and hard coded a fixed viscosity.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Now, something seems to be wrong, since the convergence of</font></div><div><font face="monospace, monospace">the nonlinear iteration is very poor:</font></div><div><font face="monospace, monospace">Number of DOFs: 2502</font></div><div><font face="monospace, monospace">Nonlinear iteration 0: err = 3.752999689e+14 eps = 0.05</font></div><div><font face="monospace, monospace">Nonlinear iteration 1: err = 2.999999938 eps = 0.05</font></div><div><font face="monospace, monospace">Nonlinear iteration 2: err = 1.515290196 eps = 0.05</font></div><div><font face="monospace, monospace">Nonlinear iteration 3: err = 1.017809712 eps = 0.05</font></div><div><font face="monospace, monospace">Nonlinear iteration 4: err = 0.768919228 eps = 0.05</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">For the same flow scenario I obtain the following convergence rate</font></div><div><font face="monospace, monospace">with an alternative fem package:</font></div><div><font face="monospace, monospace">ndofs: 59</font></div><div><font face="monospace, monospace">Nonlinear iteration 0: r (abs)=6.2970e-01 (tol=1.00e-10) r (rel)=1.0000e+00 (tol=1.00e-03)</font></div><div><font face="monospace, monospace">Starting nonlinear iteration</font></div><div><font face="monospace, monospace">Nonlinear iteration 1: r (abs)=7.2845e-02 (tol=1.00e-10) r (rel)=1.1568e-01 (tol=1.00e-03)</font></div><div><font face="monospace, monospace">Nonlinear iteration 2: r (abs)=1.0712e-06 (tol=1.00e-10) r (rel)=1.7011e-06 (tol=1.00e-03)</font></div><div><font face="monospace, monospace">Nonlinear iteration 3: r (abs)=1.4101e-15 (tol=1.00e-10) r (rel)=2.2393e-15 (tol=1.00e-03)</font></div><div><font face="monospace, monospace">Above, <span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">r (abs) corresponds to the l2 norm of F</span></font></div><div><font face="monospace, monospace"><span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">in newton iteration: (J delU = -F; u += delU),</span></font></div><div><font face="monospace, monospace"><span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">where F( = NS * u - b) is the residual of the system.</span></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Moreover, the results produced by</font></div><div><font face="monospace, monospace">freefem *with my current scripting* of the problem are totally wrong.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">I will attach my freefem script and a picture of the</font></div><div><font face="monospace, monospace">correct velocity and pressure profiles to this mail for comparison.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Any hints are welcome.</font></div><div><font face="monospace, monospace">Thanks in advance.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">p.s.:</font></div><div><font face="monospace, monospace">The installed version is:</font></div><div><font face="monospace, monospace">-- FreeFem++ v 3.570001 (date Wed Jan 10 13:15:59 CET 2018)</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Babak S. Hosseini</font></div><div style="font-family:monospace,monospace"><br></div></div><div style="font-family:monospace,monospace"><br></div><div><div class="m_7955097824803922402gmail_signature"><div dir="ltr"><div><div><span style="font-family:monospace,monospace">--</span><br><br></div><span style="font-family:monospace,monospace">Kind regards<span class="HOEnZb"><font color="#888888"><br></font></span></span></div><span class="HOEnZb"><font color="#888888"><span style="font-family:monospace,monospace">Babak S. Hosseini</span><br></font></span></div></div></div>
</div>
</div><br></div>