0
$\begingroup$
 fmp = 2*Pi*13.0*10^(9); fmo = 2*Pi*8.0*10^(9);  fep = 
 2*Pi*12.80*10^(9);  feo = 2*Pi*10.30*10^(9);  f0 = 
 11.50*10^(9); \[Omega] = 2*Pi*f0; Tc = 92; \[Lambda]0 = 140*(10)^-9;
L = 80;
c = 3*10^(8);  \[Lambda] = c/f0; d = 0.5*\[Lambda]; \[CapitalGamma] = 
 100*10^(6);
\[Mu]0 = 4*Pi*10^(-7); \[Epsilon]0 = 8.854*10^(-12);
\[Epsilon]i = \[Epsilon]t = \[Epsilon]0*(1 - (((fep)^2 - (feo)^2)/((\
\[Omega])^2 - (feo)^2 + (I*\[CapitalGamma]*\[Omega]))));
\[Mu]i = \[Mu]t = \[Mu]0*(1 - (((fmp)^2 - (fmo)^2)/((\[Omega])^2 - \
(fmo)^2 + (I*\[CapitalGamma]*\[Omega]))));
\[Lambda]l = \[Lambda]0/Sqrt[1 - (L/Tc)^4];
\[Epsilon]s = 1 - (1/((\[Omega])^2*\[Mu]0*\[Epsilon]0*(\[Lambda]l)^2));
\[Mu]s = 1;
ki = \[Omega]*Sqrt[\[Mu]t*\[Epsilon]i];
kix = ki*Sin[\[Theta]];
kiz = ki*Cos[\[Theta]];

\[Sigma] = (-1*I)/(\[Omega]*\[Mu]0*(\[Lambda]l)^2);

ns = Sqrt[\[Epsilon]s];
ktz = Sqrt[(\[Omega]^2*\[Mu]t*\[Epsilon]t) - (kix)^2];
ksz = Sqrt[(\[Omega]^2*\[Mu]s*\[Epsilon]s) - (kix)^2];
r01 = (\[Mu]i*ksz)/(\[Mu]s*kiz);
r12 = (\[Mu]s*ktz)/(\[Mu]t*ksz);
R01 = (1 - r01)/(1 + r01);
R12 = (1 - r12)/(1 + r12);
R = (R01 + (R12*Exp[2*I*ksz*d]))/(1 + (R01*R12*Exp[2*I*ksz*d]));
T = (4*Exp[
    I*ksz*d])/((1 + r01)*(1 + r12)*(1 + (R01*R12*Exp[2*I*ksz*d])));

Ptz[\[Theta]_] = Abs[(ktz*\[Mu]i)/(kiz*\[Mu]t)]*(Abs[T])^2;
Prz[\[Theta]_] = (Abs[R])^2;
Ploss[\[Theta]_] = 
  1 - (Abs[R])^2 - (Abs[(ktz*\[Mu]i)/(kiz*\[Mu]t)]*(Abs[T])^2);
tzvalue = 
  Table[Ptz[\[Theta]], {\[Theta], 0, (87*\[Pi])/180, \[Pi]/60}];
ttzValuesList = Transpose[{Join[{tt}, tzvalue]}]
ttGrid = Grid[ttzValuesList, Frame -> All]

revalue = 
  Table[Prz[\[Theta]], {\[Theta], 0, (87*\[Pi])/180, \[Pi]/60}];
rrzValuesList = Transpose[{Join[{rr}, revalue]}]
ttGrid = Grid[rrzValuesList, Frame -> All]

loss value = 
  Table[Ploss[\[Theta]], {\[Theta], 0, (87*\[Pi])/180, \[Pi]/60}];
losszValuesList = Transpose[{Join[{loss}, losszvalue]}]
ttGrid = Grid[losszValuesList, Frame -> All]
 

"The current computation was aborted because there was insufficient memory available to complete the computation." .... How can I fix this error? I tried on it a lot, I think towards using catch and throw command but I failed.

$\endgroup$
6
  • $\begingroup$ What's going on here towards the end? loss value = ... are you sure you didn't mean losszvalue here? Also this looks wrong Transpose[{Join[{loss}, losszvalue]}] because loss isn't defined. Apart ferom that, everything else runs on my system in v12.3 perfectly fine and doesn't even use a gigabyte of memory. $\endgroup$
    – flinty
    Jul 1 at 18:15
  • $\begingroup$ @flinty ... yes yes i mean losszvalue... i have delete transpose[{Join{loss},{losszvalue]}] but still has the error $\endgroup$
    – Aya
    Jul 1 at 18:22
  • $\begingroup$ Try quitting the kernel and starting afresh - it's possible theres a messed up / recursive definition in there you can't see. Also which version are you on? $\endgroup$
    – flinty
    Jul 1 at 18:23
  • $\begingroup$ i will try now.. version 11.2 $\endgroup$
    – Aya
    Jul 1 at 18:26
  • $\begingroup$ @flinty .... for sorry i still have the problem ... can you write the code that you tried please?! $\endgroup$
    – Aya
    Jul 1 at 18:29

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.