31.03.2014 Views

Computer simulation of thermal convection in Rayleigh-Bénard cell ...

Computer simulation of thermal convection in Rayleigh-Bénard cell ...

Computer simulation of thermal convection in Rayleigh-Bénard cell ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hubert Jopek<br />

<strong>Computer</strong> <strong>simulation</strong> <strong>of</strong> <strong>thermal</strong> <strong>convection</strong> <strong>in</strong> <strong>Rayleigh</strong>-<strong>Bénard</strong> <strong>cell</strong><br />

]<br />

(*Def<strong>in</strong><strong>in</strong>g the function to solve the z-component <strong>of</strong> velocity vector *)<br />

Vz[wx_,wz_,t_]:=<br />

Module[{wwx,wwz,tt,res},<br />

res=D[Psi[wwx,wwz,tt],wwz];<br />

res=res/.{wwx→wx,wwz→wz,tt→t};<br />

Return[res];<br />

]<br />

(* Plott<strong>in</strong>g the attractor *)<br />

ParametricPlot3D[<br />

Evaluate[{x[t],y[t],z[t]}/.sol],<br />

{t,0,50},<br />

PlotPo<strong>in</strong>ts→5000,<br />

Boxed→False,<br />

Axes→False,<br />

ImageSize→{500,530}<br />

]<br />

(* Plott<strong>in</strong>g the stramfunction*)<br />

Plot[<br />

Psi[L/2,3/4,s],<br />

{s,0,30},<br />

ImageSize→{300,250},<br />

PlotPo<strong>in</strong>ts→5000,<br />

PlotRange→{-30,30},<br />

AxesLabel→{"t","ψ"}<br />

]<br />

(* Plott<strong>in</strong>g temperature map *)<br />

TemperaturePlots={}<br />

Do[<br />

AppendTo[<br />

TemperaturePlots,<br />

ShowLegend[<br />

DensityPlot[<br />

Theta[wx,wz,s][[1]],<br />

{wx,0,2*L},<br />

{wz,0,1},<br />

ColorFunction→(RGBColor[#,1-#,1-#]&),<br />

Mesh→False,PlotPo<strong>in</strong>ts→100,<br />

DisplayFunction→Identity,<br />

ImageSize→{280,280}<br />

],<br />

{RGBColor[#,1-#,1-#]&,25,<br />

ToStr<strong>in</strong>g[Tc],<br />

ToStr<strong>in</strong>g[Tw],<br />

LegendPosition→{1.1,-.8},<br />

LegendSize→{0.3,1.7}}<br />

],<br />

],<br />

{s,16,18,0.1}<br />

42

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!