You are on page 1of 3

In[1]:= H∗ Alan Ono Segundo 09158−8 ∗L

H∗ Lista3−exercício1 ∗L
Plot @H1 ê 5L ∗ H1 + Sin@1 + xD ^ 2L, 8x, 0, 2 Pi<, PlotRange → 80, 1 ê 2<,
PlotLabel → 8"Perfil do tubo"<, PlotStyle → RGBColor@0, 0, 1DD
<< Graphics`SurfaceOfRevolution`
SurfaceOfRevolution @H1 ê 5L ∗ H1 + Sin@1 + xD ^ 2L, 8x, 0, 2 Pi<,
RevolutionAxis → 81, 0<, AspectRatio → Automatic, PlotLabel −> "Secção do Tubo"D
S = Pi ∗ r ^ 2
r = H1 ê 5L ∗ H1 + Sin@1 + xD ^ 2L
FluidEquation = H1 ê SL ∗ D@S ∗ D@psi@x, tD, xD, xD − H1 ê c ^ 2L ∗ D@psi@x, tD, 8t, 2<D
Plot@Exp@− x ^ 2D, 8x, − 3, 3<, PlotLabel → "Pulso de onda inicial"D
Clear@c, psiD
c = 342
solution =
NDSolve@8FluidEquation  0, psi@x, 0D  Exp@− x ^ 2D, Derivative@0, 1D@psiD@x, 0D  100,
psi@− 2 Pi, tD  psi@2 Pi, tD<, 8psi@x, tD<, 8x, − 2 Pi, 2 Pi<,
8t, 0, 1 ê 2<, MaxSteps → 5000, StartingStepSize −> 0.03D@@1, 1, 2DD
P = D@solution@x, tD, tD
DensityPlot@Evaluate@PD, 8x, − 2 Pi, 2 Pi<, 8t, 0, 1 ê 2<,
PlotPoints → 120, Mesh → False, ColorFunction → Hue, AxesLabel → 8"x", "t"<,
Axes → True, PlotLabel −> "DensityPlot of de Excess Pressure"D

8Perfil do tubo<
0.5

0.4

0.3
Out[1]=

0.2

0.1

0 1 2 3 4 5 6

General::obspkg :
Graphics`SurfaceOfRevolution` is now obsolete. The legacy version being loaded may conflict with current
Mathematica functionality. See the Compatibility Guide for updating information. à

Out[3]=

Out[4]= π r2

1
Out[5]= I1 + Sin@1 + xD2 M
5
2 L3_E1.nb

psiH0,2L @x, tD 1 4
Out[6]= − + 25 π Cos@1 + xD Sin@1 + xD I1 + Sin@1 + xD2 M psiH1,0L @x, tD +
c2 π I1 + Sin@1 + xD2 M
2 25

1 2
π I1 + Sin@1 + xD2 M psiH2,0L @x, tD
25

Pulso de onda inicial


1.0

0.8

0.6
Out[7]=

0.4

0.2

-3 -2 -1 1 2 3

Out[9]= 342

NDSolve::mxst : Maximum number of 5000 steps reached at the point t == 0.11423622290312081`. à

NDSolve::eerr :
Warning: Scaled local spatial error estimate of 472.7287022837338` at t = 0.11423622290312081`
in the direction of independent variable x is much greater than prescribed error
tolerance. Grid spacing with 279 points may be too large to achieve the desired
accuracy or precision. A singularity may have formed or you may want to specify
a smaller grid spacing using the MaxStepSize or MinPoints method options. à
Out[10]= InterpolatingFunction @88− 6.28319, 6.28319<, 80., 0.114236<<, <>D@x, tD

Out[11]= InterpolatingFunction @88− 6.28319, 6.28319<, 80., 0.114236<<, <>D@x, tDH0,1L @x, tD +
InterpolatingFunction @88− 6.28319, 6.28319<, 80., 0.114236<<, <>D@x, tD@x, tD

InterpolatingFunction::dmval :
Input value 8-6.28308, 0.117651< lies outside the range of data in the interpolating function.
Extrapolation will be used. à

InterpolatingFunction::dmval :
Input value 8-6.28308, 0.117651< lies outside the range of data in the interpolating function.
Extrapolation will be used. à

InterpolatingFunction::dmval :
Input value 8-6.17748, 0.117651< lies outside the range of data in the interpolating function.
Extrapolation will be used. à

General::stop : Further output of InterpolatingFunction::dmval will be suppressed during this calculation. à


L3_E1.nb 3

DensityPlot of de Excess Pressure


t
0.5

0.4

0.3
Out[12]=

0.2

0.1

0.0
-6 -4 -2 0 2 4 6

You might also like