23 |
mypde.setValue(A=kappa*kronecker(mydomain),D=rhocp/h,d=eta,y=eta*Tref) |
mypde.setValue(A=kappa*kronecker(mydomain),D=rhocp/h,d=eta,y=eta*Tref) |
24 |
# ... set heat source: .... |
# ... set heat source: .... |
25 |
x=mydomain.getX() |
x=mydomain.getX() |
26 |
q=qc*whereNegative(length(x-xc)-r) |
qH=qc*whereNegative(length(x-xc)-r) |
27 |
# ... set initial temperature .... |
# ... set initial temperature .... |
28 |
T=Tref |
T=Tref |
29 |
# ... start iteration: |
# ... start iteration: |
31 |
i+=1 |
i+=1 |
32 |
t+=h |
t+=h |
33 |
print "time step :",t |
print "time step :",t |
34 |
mypde.setValue(Y=q+rhocp/h*T) |
mypde.setValue(Y=qH+rhocp/h*T) |
35 |
T=mypde.getSolution() |
T=mypde.getSolution() |
36 |
saveVTK("T.%d.xml"%i,temp=T) |
saveVTK("T.%d.xml"%i,temp=T) |