(*定义 Psi 函数*)\[Psi][theta_, gamma_, delta_] :=
PDF[TruncatedDistribution[{0, Pi/2},
NormalDistribution[gamma, delta]], theta]
(*定义 nz0*)
nz0[gamma_, delta_, lf_] :=
NIntegrate[\[Psi][theta, gamma, delta]*Cos[theta]*
Boole[theta < ArcSin[2*y/lf]], {theta, 0, Pi/2}, {y, 0, lf/2}]/6.5
(*定义 \[CapitalPhi]z0*)
\[CapitalPhi]z0[gamma_, delta_, lf_] :=
NIntegrate[\[Psi][theta, gamma, delta]*
Boole[theta < ArcSin[2*y/lf]], {theta, 0, Pi/2}, {y, 0, lf/2}]/6.5
(*定义 A0*)
A0[lf_, theta_] := (Pi*lf^2/2)*Sin[theta]
(*定义 A1*)
A1[lf_, y_, theta_] := lf^2*Sin[theta]*ArcSin[2*y/(lf*Sin[theta])]
(*定义 nz1*)
nz1[gamma_, delta_, lf_] :=
NIntegrate[(A1[lf, y, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Cos[theta]*
Boole[ArcSin[2 y/lf] < theta < ArcSin[2 z/lf]]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 \[CapitalPhi]y1*)
\[CapitalPhi]y1[gamma_, delta_, lf_] :=
NIntegrate[(A1[lf, y, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Boole[ArcSin[2 y/lf] < theta < ArcSin[2 z/lf]]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 A2*)
A2[lf_, y_, z_, theta_] :=
Abs[lf^2*Sin[theta]*(ArcSin[2*y/lf] - ArcCos[2*z/lf])]
(*定义 nz2*)
nz2[gamma_, delta_, lf_] :=
NIntegrate[(A2[lf, y, z, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Cos[theta]*Boole[ArcSin[2*z/lf] < theta]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 \[CapitalPhi]z2*)
\[CapitalPhi]z2[gamma_, delta_, lf_] :=
NIntegrate[(A2[lf, y, z, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Boole[ArcSin[2 z/lf] < theta]*Boole[y < z], {theta, 0,
Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 nz3*)
nz3[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - A1[lf, y, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*(2/Pi)*(Sqrt[lf^2 - 4*y^2]/lf)*
Boole[ArcSin[2 y/lf] < theta]*Boole[y < z], {theta, 0,
Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}, MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*定义 \[CapitalPhi]z3*)
\[CapitalPhi]z3[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - A1[lf, y, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*Boole[ArcSin[2 y/lf] < theta]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2},
MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*定义 Az*)
Az[lf_, z_, theta_] := lf^2*Sin[theta]*ArcSin[2*z/(lf*Sin[theta])]
(*定义 nz4*)
nz4[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - Az[lf, z, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*(2/Pi)*(Sqrt[lf^2 - 4*z^2]/lf)*
Boole[ArcSin[2 z/lf] < theta]*Boole[y < z], {theta, 0,
Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}, MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*定义 \[CapitalPhi]z4*)
\[CapitalPhi]z4[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - Az[lf, z, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*Boole[ArcSin[2 z/lf] < theta]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2},
MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*手动输入参数*)
delta = Pi/10;
lf = 13;
(*生成 gamma 的取值列表*)
gammaValues = Table[Pi*i/20, {i, 1, 10}];
省掉了后面对一些结果进行简单求和以及结果输出形式的部分
PDF[TruncatedDistribution[{0, Pi/2},
NormalDistribution[gamma, delta]], theta]
(*定义 nz0*)
nz0[gamma_, delta_, lf_] :=
NIntegrate[\[Psi][theta, gamma, delta]*Cos[theta]*
Boole[theta < ArcSin[2*y/lf]], {theta, 0, Pi/2}, {y, 0, lf/2}]/6.5
(*定义 \[CapitalPhi]z0*)
\[CapitalPhi]z0[gamma_, delta_, lf_] :=
NIntegrate[\[Psi][theta, gamma, delta]*
Boole[theta < ArcSin[2*y/lf]], {theta, 0, Pi/2}, {y, 0, lf/2}]/6.5
(*定义 A0*)
A0[lf_, theta_] := (Pi*lf^2/2)*Sin[theta]
(*定义 A1*)
A1[lf_, y_, theta_] := lf^2*Sin[theta]*ArcSin[2*y/(lf*Sin[theta])]
(*定义 nz1*)
nz1[gamma_, delta_, lf_] :=
NIntegrate[(A1[lf, y, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Cos[theta]*
Boole[ArcSin[2 y/lf] < theta < ArcSin[2 z/lf]]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 \[CapitalPhi]y1*)
\[CapitalPhi]y1[gamma_, delta_, lf_] :=
NIntegrate[(A1[lf, y, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Boole[ArcSin[2 y/lf] < theta < ArcSin[2 z/lf]]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 A2*)
A2[lf_, y_, z_, theta_] :=
Abs[lf^2*Sin[theta]*(ArcSin[2*y/lf] - ArcCos[2*z/lf])]
(*定义 nz2*)
nz2[gamma_, delta_, lf_] :=
NIntegrate[(A2[lf, y, z, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Cos[theta]*Boole[ArcSin[2*z/lf] < theta]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 \[CapitalPhi]z2*)
\[CapitalPhi]z2[gamma_, delta_, lf_] :=
NIntegrate[(A2[lf, y, z, theta]/A0[lf, theta])*\[Psi][theta, gamma,
delta]*Boole[ArcSin[2 z/lf] < theta]*Boole[y < z], {theta, 0,
Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}]/21.125
(*定义 nz3*)
nz3[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - A1[lf, y, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*(2/Pi)*(Sqrt[lf^2 - 4*y^2]/lf)*
Boole[ArcSin[2 y/lf] < theta]*Boole[y < z], {theta, 0,
Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}, MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*定义 \[CapitalPhi]z3*)
\[CapitalPhi]z3[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - A1[lf, y, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*Boole[ArcSin[2 y/lf] < theta]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2},
MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*定义 Az*)
Az[lf_, z_, theta_] := lf^2*Sin[theta]*ArcSin[2*z/(lf*Sin[theta])]
(*定义 nz4*)
nz4[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - Az[lf, z, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*(2/Pi)*(Sqrt[lf^2 - 4*z^2]/lf)*
Boole[ArcSin[2 z/lf] < theta]*Boole[y < z], {theta, 0,
Pi/2}, {y, 0, lf/2}, {z, 0, lf/2}, MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*定义 \[CapitalPhi]z4*)
\[CapitalPhi]z4[gamma_, delta_, lf_] :=
NIntegrate[(A0[lf, theta] - Az[lf, z, theta])/A0[lf, theta]*\[Psi][
theta, gamma, delta]*Boole[ArcSin[2 z/lf] < theta]*
Boole[y < z], {theta, 0, Pi/2}, {y, 0, lf/2}, {z, 0, lf/2},
MaxRecursion -> 20,
Method -> {GlobalAdaptive, MaxErrorIncreases -> 10000}]/21.125
(*手动输入参数*)
delta = Pi/10;
lf = 13;
(*生成 gamma 的取值列表*)
gammaValues = Table[Pi*i/20, {i, 1, 10}];
省掉了后面对一些结果进行简单求和以及结果输出形式的部分