these are two relativistic fluid governing equations, ∂_t (γe)+∂_x(γev)=0 γ∂_t(γv)+∂_x[(γv)^2/2]=-(C/(1+C))*∂_x[log(e)] where γ=1/sqrt(1-v^2) is Lorentz factor, v=v(x,t) is three velocity, e=e(x,t) is energy density, C is a parameter.

Initial condition


Boundary condition: periodic boundary condition, but I don't konw what it is. I use mathematica solve these equations numerically, here is the code

\[Gamma] = 1/(1 - (v[x, t])^2)^0.5;
pde = {D[\[Gamma] e[x, t], t] + D[\[Gamma] e[x, t] v[x, t], x] == 0,
\[Gamma]D[\[Gamma] v[x, t], t] + D[0.5 (\[Gamma] v[x, t])^2, x] + 
     C D[Log[e[x, t]], x]/(1 + C) == 0};
ic = {v[x, 0] == 0.5, e[x, 0] == Sech[2 x] + 1, C == 1/3};
bc = {v[-1, t] == 0.5, v[1, t] == 0.5, e[-1, t] == Sec[-2] + 1, 
e[1, t] == Sec[2] + 1};
sol = NDSolve[{pde, ic, bc}, {v, e}, {x, -1, 1}, {t, 0, 2}]

My question is the boundary condition, how to set it, and I am not sure my code is right.

enter image description here

enter image description here

  • $\begingroup$ There are inconsistent conditions: e[x, 0] == Sech[2 x] + 1 and e[-1, t] == Sec[-2] + 1, Maybe this is a typo Sec instead of Sech $\endgroup$ Nov 21 '21 at 11:22
  • $\begingroup$ initial eqaution is sech, which ensures the energy is concentrated whtin a range, the bc is periodic, but the specific form has not been given in paper, $\endgroup$
    – zhiwei min
    Nov 21 '21 at 11:38
  • $\begingroup$ @zhiweimin Could you give a link to the paper? $\endgroup$ Nov 21 '21 at 18:05
  • $\begingroup$ You need to specify c (C is a reserved symbol) at the beginning of the computation. Also, \[Gamma]D[\[Gamma] should be \[Gamma] D[\[Gamma]. With these changes, your code produces results, although with warning messages. $\endgroup$
    – bbgodfrey
    Nov 23 '21 at 1:03
  • $\begingroup$ Use bc = {v[-1, t] == v[1, t], e[-1, t] == e[1, t]} to set periodic boundary conditions. $\endgroup$
    – bbgodfrey
    Nov 23 '21 at 1:07

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.