3
$\begingroup$

I want to improve the last code to find a better solution for umi. For now I'm using only MaxStepFraction. Also, when I put no boundary condition to find umi, I get a better answer, despite getting these warning messages:

The PDE is convection dominated and the result may not be stable. Adding artificial diffusion may help.

No DirichletCondition or Robin-type NeumannValue was specified; the result may be off by a constant value.

Why's that?

V[r_, ϕ_, z_] = 
  FullSimplify[(
   i ρ  (EllipticF[π - ϕ/2, -((
        4 a r)/((a - r)^2 + z^2))] + 
      EllipticF[ϕ/2, -((4 a r)/((a - r)^2 + z^2))]))/(
   4 π^2 Sqrt[(a - r)^2 + z^2])];

Vt[r_, ϕ_, z_] = V[r, ϕ, z + h] + V[r, ϕ, z - h];

V2[r_, z_] = Vt[r, 0, z];

Er[r_, z_] = -D[V2[r, z], r];
Ez[r_, z_] = -D[V2[r, z], z];

Jr[r_, z_] = Er[r, z]/ρ;
Jz[r_, z_] = Ez[r, z]/ρ;

J[r_, z_] = Sqrt[Jr[r, z]^2 + Jz[r, z]^2];

Et[r_, z_] = Sqrt[Er[r, z]^2 + Ez[r, z]^2];

{i,a,ρ,h,kt,α}= {2000,300,100,2.7,2.6,7.74*^-7};

{ro,zo,rf,zf,Tar,Tsolo,hc,tff} = {0,0,600,600,18,18,1,9600*3600};

Needs["NDSolve`FEM`"];

bmesh = 
  ToElementMesh[Rectangle[{ro, zo}, {rf, zf}], 
    "MaxCellMeasure" -> 5, "MeshOrder" -> 2, 
    MeshQualityGoal -> "Maximum", AccuracyGoal -> 5]; 
bmesh["Wireframe"]

Temp = 
  NDSolveValue[{D[T[t, r, z], r, r] + 1/r D[T[t, r, z], r] + 
     D[T[t, r, z], z, z] + (ρ ((J[r, z])^2) )/kt == 
    1/α D[T[t, r, z], t], T[0, r, z] == Tsolo, 
   D[T[t, r, zo], z] == hc/kt (T[t, r, zo] - Tar), 
   T[t, r, zf] == T[t, ro, z] == T[t, rf, z] == Tsolo}, 
  T, {t, 0, tff}, {r, z} ∈ bmesh, Method -> "FiniteElement"]

{u0,kh,Ke,δt,ρo} = {0.18,10^-6,0.5*^-9,0.055,2};

dT1[t_, r_] = D[Temp[t, r, 3], r];
E2[r_] = Et[r, 3];

umi = 
  NDSolveValue[{kh t D[u[t, r], r] - 2 π a u[t, r] + 
     2 π a u0 + t kh δt ρo dT1[t, r] - Ke E2[r] t == 
    0, u[t, 305] == u0}, u, {t, 0.000001, 10^7}, {r, 300, 305}, 
  MaxStepFraction -> 1/1000]

Plot[{umi[10, r], umi[100000, r], umi[10000000, r]}, {r, 300, 305}, 
  PlotRange -> All]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.