Changeset 8862
- Timestamp:
- May 9, 2013, 6:22:19 PM (12 years ago)
- Location:
- trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe
- Files:
-
- 2 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/parabolic_canal.py
r8275 r8862 6 6 from anuga_1d.config import g, epsilon 7 7 from anuga_1d.base.generic_mesh import uniform_mesh 8 import anuga_1d.sqpipe.sqpipe_domain as dom 8 9 9 10 #=============================================================================== … … 66 67 #=============================================================================== 67 68 68 def get_domain( dom):69 def get_domain(): 69 70 N = 100 70 71 print "Evaluating domain with %d cells" %N 72 71 73 domain = dom.Domain(*uniform_mesh(N, x_0 = -2.0*L_x, x_1 = 2.0*L_x), bulk_modulus = 100.0) 72 74 … … 99 101 100 102 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 103 104 domain.write_time() 101 105 x, z, w, h, v, t, s, m, M = get_quantities(domain) 102 106 -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/run_parabolic_canal.py
r8850 r8862 1 import anuga_1d.sqpipe.parabolic_canal 1 2 2 import time 3 import anuga_1d.sqpipe.sqpipe_domain as dom4 3 5 4 6 domain = anuga_1d.sqpipe.parabolic_canal.get_domain(dom) 5 import parabolic_canal as model 6 7 domain = model.get_domain() 7 8 finaltime = 1000.0 8 9 yieldstep = 10.0 9 #m0 = (domain.get_mass()).sum()10 #for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):11 # m = (domain.get_mass()).sum()12 # if abs(m - m0) > 0.5:13 # print m0 - m14 #15 # m0 = m16 17 #outfile="out"18 #anuga_1d.sqpipe.parabolic_canal.write_domain(domain, outfile)19 10 20 anuga_1d.sqpipe.parabolic_canal.animate_domain(domain, yieldstep, finaltime) 11 12 model.animate_domain(domain, yieldstep, finaltime) 21 13 print "finished" 22 anuga_1d.sqpipe.parabolic_canal.plot_domain(domain)14 model.plot_domain(domain) -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe.h
r8274 r8862 133 133 struct sqpipe_params *sp = (struct sqpipe_params *) p; 134 134 135 quantityflux[0] = (normal * pq->u) * quantity_get_conserved(q, 0, normal); 136 quantityflux[1] = normal * (pq->u * quantity_get_conserved(q, 1, normal) + 0.5 * sp->g * pq->h *pq->h); 135 //quantityflux[0] = (normal * pq->u) * quantity_get_conserved(q, 0, normal); 136 //quantityflux[1] = normal * (pq->u * quantity_get_conserved(q, 1, normal) + 0.5 * sp->g * pq->h *pq->h); 137 quantityflux[0] = (normal * pq->u) * pq->a; 138 quantityflux[1] = normal * (pq->u * pq->d + 0.5 * sp->g * pq->h *pq->h); 137 139 138 140 return quantityflux; -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe_domain.py
r8274 r8862 152 152 # Import flux method and call it 153 153 from anuga_1d.sqpipe.sqpipe_comp_flux import compute_fluxes_ext 154 self.flux_timestep = compute_fluxes_ext(timestep,self) 154 155 self.flux_timestep = compute_fluxes_ext(timestep,self) 155 156 156 157 def update_state(self):
Note: See TracChangeset
for help on using the changeset viewer.