geoflow

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Applications > Fluids >

geoflow

Previous pageReturn to chapter overviewNext page

{ GEOFLOW.PDE  

 

 In its simplest form, the nonlinear steady-state quasi-geostrophic equation

 is the coupled set:

 

             q  = eps*del2(psi) + y                    (1)

 

       J(psi,q) = F(x,y) - k*del2(psi)                 (2)

 

 

 where psi     is the stream function

       q       is the absolute vorticity

       F       is a specified forcing function

 

       eps and k are specified parameters

 

       J       is the Jacobian operator:

 

               J(a,b) = dx(a)*dy(b) - dy(a)*dx(b)

 

 The single boundary condition is the one on psi stating that the closed

 boundary C of the 2D area should be streamline:

 

       psi = 0 on C.

 

 In this test, the term k*del2(psi) in (2) has been replaced by (k/eps)*(q-y),

 and a smoothing diffusion term damp*del2(q) has been added.

 

 Only the natural boundary condition is needed for Q.

}  

 

title 'Quasi-Geostrophic Equation, square, eps=0.005'  

 

variables  

   psi  

   q  

 

definitions  

   kappa = .05  

   epsilon = 0.005  

   koe = kappa/epsilon  

   size = 1.0  

   f = -sin(pi*x)*sin(pi*y)  

   damp =  1.e-3*koe  

 

initial values  

   psi = 0.  

   q   = y  

 

equations  

   psi: epsilon*del2(psi) - q = -y  

   q:   dx(psi)*dy(q) - dy(psi)*dx(q) + koe*q - damp*del2(q) = koe*y + f  

 

boundaries  

  region 1  

      start(0,0) value(psi)=0 natural(q)=0

      line to (1,0) to (1,1) to (0,1) to close  

 

monitors  

  contour(psi)  

  contour(q)  

 

plots  

  contour(psi) as "Potential"  

  contour(q)   as "Vorticity"  

  surface(psi) as "Potential"  

  surface(q)   as "Vorticity"  

  vector(-dy(psi),dx(psi)) as "Flow"  

 

end