# Diff of /trunk/finley/test/python/axisymm-splitB.py

revision 1417 by gross, Mon Feb 25 04:45:48 2008 UTC revision 1552 by gross, Thu May 8 08:52:41 2008 UTC
# Line 1  Line 1
1  #  #
2  #   AXI-SYMMETRIC NEWTONIAN MODEL ; UPDATED LAGRANGIAN FORMULATION  #   AXI-SYMMETRIC NEWTONIAN MODEL ; UPDATED LAGRANGIAN FORMULATION
3  #  #
4    #
5    #    step 1 rho*(v_star-v) = dt * (sigma'_ij,j-teta3*p,i+f_i)
6    #    step 2 dp=-dt*B*(v_j,j+teta1*v_star_j,j-dt*teta1*((1-teta3)*p_,jj+teta2*dp_,jj))
7    #    step 3 rho*(v+-v) = -dt*((1-teta3)*p_,jj+teta2*dp_,jj)
8    #    step 4 p+=1/2(p+dp+abs(p+dp))
9    #    step 4 sigma'i+_ij,j=f(v+,p+,...)
10    #
11    #
12  from esys.escript import *  from esys.escript import *
13  from esys.escript.linearPDEs import LinearSinglePDE, LinearPDESystem  from esys.escript.linearPDEs import LinearSinglePDE, LinearPDESystem
14  from esys.finley import Rectangle  from esys.finley import Rectangle
# Line 25  alphaw   =   1.00 Line 33  alphaw   =   1.00
33  L        =   1.0  L        =   1.0
34  teta1    =    0.5  teta1    =    0.5
35  teta2    =    0.5  teta2    =    0.5
36    teta3    =    0  # =0 split A; =1 split B
37  Etau=1000000000.  Etau=1000000000.
38
39    # create domain:
40  dom=Rectangle(int(nel*L/min(L,H)),int(nel*H/min(L,H)),order=1, l0=L, l1=H)  dom=Rectangle(int(nel*L/min(L,H)),int(nel*H/min(L,H)),order=1, l0=L, l1=H)
41  x=dom.getX()  x=dom.getX()
42
43
44  momentumStep1=LinearPDESystem(dom) # A momentumStep1  momentumStep1=LinearPDESystem(dom) # A momentumStep1
45  momentumStep1.setValue(q=whereZero(x[0])*[1.,0.]) # +whereZero(x[1])*[1.,1.])  momentumStep1.setValue(q=whereZero(x[0])*[1.,0.]) # +whereZero(x[1])*[1.,1.])