/[escript]/trunk/finley/test/python/convection.py
ViewVC logotype

Diff of /trunk/finley/test/python/convection.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1658 by gross, Mon Jul 14 08:55:25 2008 UTC revision 1659 by gross, Fri Jul 18 02:28:13 2008 UTC
# Line 64  if True: Line 64  if True:
64     ETAP0=ETA0     ETAP0=ETA0
65     TAUY=None     TAUY=None
66     useJAUMANNSTRESS=False     useJAUMANNSTRESS=False
67       # this is a simple linear Stokes model:
68       RA=1.e5 # Rayleigh number
69       A=0 # Arenious number
70       DI = 0.  # dissipation number
71       MU=None
72       ETA0=1.
73       TAU0=250.
74       N=None
75       NPL=None
76       ETAP0=ETA0
77       TAUY=TAU0
78       useJAUMANNSTRESS=False
79  else:  else:
80     RA=1.e4 # Rayleigh number     RA=1.e4 # Rayleigh number
81     A=22 # Arenious number     A=22 # Arenious number
# Line 206  while t<T_END: Line 218  while t<T_END:
218        t_out+=DT_OUT        t_out+=DT_OUT
219        n_out+=Dn_OUT        n_out+=Dn_OUT
220      # calculation of nusselt number:      # calculation of nusselt number:
221      se=sp.getStrainEnergy()      se=sp.getMechanicalPower()
222        print "Xse:",inf(se),sup(se)
223      Nu=1.+integrate(se)/(RA*vol)      Nu=1.+integrate(se)/(RA*vol)
224      if dom.getMPIRank() ==0: nusselt_file.write("%e %e\n"%(t,Nu))      if dom.getMPIRank() ==0: nusselt_file.write("%e %e\n"%(t,Nu))
225      heat.setValue(v=interpolate(v,ReducedSolution(dom)),Q=DI/RA*se)      heat.setValue(v=interpolate(v,ReducedSolution(dom)),Q=DI/RA*se)
226      print "nusselt number = ",Nu      print "Xnusselt number = ",Nu, "dt =",dt
227      if n>0:      if n>0:
228          a,a_alt = (v_last-v)/dt, a          a,a_alt = (v_last-v)/dt, a
229          dt_a,dt_a_alt = dt, dt_a          dt_a,dt_a_alt = dt, dt_a

Legend:
Removed from v.1658  
changed lines
  Added in v.1659

  ViewVC Help
Powered by ViewVC 1.1.26