\[CapitalOmega] = ImplicitRegion[True, {{z, 0, 200}}];
\[CapitalGamma]2 = NeumannValue[0., x == 0 || x == 200]
s = NDSolveValue[{D[n[t, z], t] -
D[n[t, z], {z, 2}] - \[Tau]/
nb \[Alpha] (1 -
R) Pdensity/(Sqrt[2 \[Pi] ] \[Tau]L hv ) gauss[t,
0, \[Tau]L/\[Tau]] Exp[-\[Alpha] Ldi z] == -Ldi e^2 nb Ldi/(k \
T \[Epsilon] \[Epsilon]b) (0 + eF0O[z]) D[n[t, z] , z] -
Ldi e^2 nb Ldi/(k T \[Epsilon] \[Epsilon]b) (p0[z] - n0[z] 0 +
1 - E^(-2 u)) n[t, z] + \[CapitalGamma]2,
n[-10 \[Tau]L/\[Tau], z] == 0
},
n,
{t, -10 \[Tau]L/\[Tau], 5},
{z} \[Element] \[CapitalOmega],
PrecisionGoal -> 35,
Method -> {"PDEDiscretization" -> {Automatic,
"SpatialDiscretization" -> {"FiniteElement",
"MeshOptions" -> {MaxCellMeasure -> 0.001}}}}]
Plot[QuantityMagnitude[nb, "Centimeters^-3"] s[t0/n\[Tau],
z/nLdi], {z, 0, 200 nLdi }, PlotRange -> All], {t0, -10 n\[Tau]L,
5 n\[Tau]}]
Manipulate[
Plot[QuantityMagnitude[nb, "Centimeters^-3"] ND[
s[t0/n\[Tau], z/nLdi], z, z0], {z0, 0, 200 nLdi },
PlotRange -> All], {t0, -10 n\[Tau]L, 5 n\[Tau]}]
代码如上所示,一维问题,NeumannValue边界条件设置了两侧边界导数值为0,但实际求解出来的两侧导数值并不为0,似乎是方法自己生成的某种边界条件。报错的提示显示NeumannValue函数无法正确识别边界。第一张图是报错的提示,第二张图是解的导数的图,可以看到两侧边界导数并不为0,第三章是代码图。求大佬帮忙
Manipulate[
\[CapitalGamma]2 = NeumannValue[0., x == 0 || x == 200]
s = NDSolveValue[{D[n[t, z], t] -
D[n[t, z], {z, 2}] - \[Tau]/
nb \[Alpha] (1 -
R) Pdensity/(Sqrt[2 \[Pi] ] \[Tau]L hv ) gauss[t,
0, \[Tau]L/\[Tau]] Exp[-\[Alpha] Ldi z] == -Ldi e^2 nb Ldi/(k \
T \[Epsilon] \[Epsilon]b) (0 + eF0O[z]) D[n[t, z] , z] -
Ldi e^2 nb Ldi/(k T \[Epsilon] \[Epsilon]b) (p0[z] - n0[z] 0 +
1 - E^(-2 u)) n[t, z] + \[CapitalGamma]2,
n[-10 \[Tau]L/\[Tau], z] == 0
},
n,
{t, -10 \[Tau]L/\[Tau], 5},
{z} \[Element] \[CapitalOmega],
PrecisionGoal -> 35,
Method -> {"PDEDiscretization" -> {Automatic,
"SpatialDiscretization" -> {"FiniteElement",
"MeshOptions" -> {MaxCellMeasure -> 0.001}}}}]
Plot[QuantityMagnitude[nb, "Centimeters^-3"] s[t0/n\[Tau],
z/nLdi], {z, 0, 200 nLdi }, PlotRange -> All], {t0, -10 n\[Tau]L,
5 n\[Tau]}]
Manipulate[
Plot[QuantityMagnitude[nb, "Centimeters^-3"] ND[
s[t0/n\[Tau], z/nLdi], z, z0], {z0, 0, 200 nLdi },
PlotRange -> All], {t0, -10 n\[Tau]L, 5 n\[Tau]}]
代码如上所示,一维问题,NeumannValue边界条件设置了两侧边界导数值为0,但实际求解出来的两侧导数值并不为0,似乎是方法自己生成的某种边界条件。报错的提示显示NeumannValue函数无法正确识别边界。第一张图是报错的提示,第二张图是解的导数的图,可以看到两侧边界导数并不为0,第三章是代码图。求大佬帮忙
Manipulate[