Hi Wan, Try this: aaa = 1.34161*(0.5*(tanh(500000000*(1-r)) +1)) + (1-0.2*1.0*1.0*exp(1-(r-4).*(r-4))).^2.5.*(1 - 0.5*(tanh(500000000*(1-r)) + 1));
On Tuesday, October 22, 2019 at 2:12:15 AM UTC-5, Kiny Wan wrote: > > > > Hi Freddie, > > The hyperbolic tangent (tanh) function is difficult to initiate a > shock wave. The following is a matlab code and its related picture: > > r=-5:0.0001:5; > > aaa=1.34161*tanh(500000000*(1-tanh(500000000*(r))))+(1-0.2*1.0*1.0*exp(1-(r-4).*(r-4))).^2.5.*tanh(500000000*(1+tanh(500000000*(r)))/2); > plot(r,aaa) > > A *peak value* is generated near x=0. > > [image: untitled.jpg] > > Yours > Wan > -- You received this message because you are subscribed to the Google Groups "PyFR Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/pyfrmailinglist/df17dea7-880e-489c-afdb-3b98db6cbc15%40googlegroups.com.
