0
$\begingroup$

I have this equation $$ D = 1.22 \frac{\lambda f}{R_{0} \sqrt{1+2 \alpha\Delta T}} $$ in which D is the diameter of the circular opening, and the parameters I want to vary to analyze the diffraction figure are wavelength $(\lambda)$, focal length $(f)$, initial aperture radius $(R_{0})$, expansion coefficient $(\alpha)$, temperature variation $(\Delta T)$.

First, I want to vary the value of $R_{0}$, and keep the values of $\alpha$ and $\Delta T$ fixed.

Second, I want to vary the value of $\alpha$, and keep the values of $R_{0}$ and $\Delta T$ fixed.

Third, I want to vary the value of $\Delta T$, and keep the values of $R_{0}$ and $\alpha$ fixed.

Is there a way to make a program like this and have it return the values of D and a graph with the modification that the diffraction figure underwent in these cases?

The diffraction figure is something like

enter image description here

The parameter values, for the wavelength: $\lambda = 514 nm $, $\lambda = 632 nm $, $\lambda = 750 nm $, for focal length: $f = 2 cm$, $f = 10 cm$, $f = 15 cm$, for the coefficient $\alpha = 8.6*10^{-6}$, $\alpha = 25*10^{-6}$, $\alpha = 18*10^{-6}$

Ranging $R_{0}$ in a range from 1mm to 10mm, fixed $\alpha = 8.6*10^{-6}$ and $\Delta T = 1$

Ranging from $\alpha$ to $\alpha = 8.6 * 10^{-6}$, $\alpha = 25*10^{-6}$, $\alpha = 18*10^{-6}$, fixed $R_{0}= 1mm$ and $\Delta T = 1$

Ranging $\Delta T$ from 0.1 to 1, fixed $R_{0} = 1mm$ and $\alpha = 8.6*10^{-6} $.

At first it would be that, but the idea is that I can change these values later in the program as I do more experiments.

$\endgroup$
3
  • 1
    $\begingroup$ You have not defined nor provided an example of what you mean by a "diffraction figure". When you vary the parameters, what range do you want for each parameter? For when the parameters are fixed, what are the fixed values? $\endgroup$
    – Bob Hanlon
    Commented Sep 23, 2020 at 19:16
  • $\begingroup$ Thank you very much, I edited the issue with your comments $\endgroup$ Commented Sep 23, 2020 at 20:25
  • $\begingroup$ This might be related. mathematica.stackexchange.com/questions/160913/… $\endgroup$
    – Bill Watts
    Commented Sep 23, 2020 at 21:24

1 Answer 1

2
$\begingroup$

The formula that you provided does not appear to correspond to the diffraction figures that you provided. I have provided an interactive plot for the formula that you provided.

Clear["Global`*"]

Manipulate[
 Module[{plt},
  d[λ_, f_, R0_, α_, ΔT_] :=
   1.22 λ f/(Quantity[R0, "Millimeter"] Sqrt[1 + 2 α ΔT]);
  Switch[calc,
   1, α = 8.6*10^-6; ΔT = 1.;
   plt = Plot[
     UnitConvert[d[λ, f, R0v, α, ΔT], "Micrometers"],
     {R0v, 1, 10},
     PlotRange -> All,
     Frame -> True,
     FrameLabel -> (Style[#, 14, Bold] & /@
        {StringForm[
          "``, aperture radius (mm)", Subscript[R, 0]], 
         "D, diameter of opening (µm)"}),
     Epilog -> {Red, Thick, 
       Line[{{R0, 0}, {R0, 
          QuantityMagnitude@
           UnitConvert[d[λ, f, R0, α, ΔT], "Micrometers"]}}]},
     ImageSize -> Medium],
   2, R0 = 1; ΔT = 1.;
   plt = Plot[
     UnitConvert[d[λ, f, R0, αv, ΔT], "Micrometers"],
     {αv, 6.5*10^-6, 30*10^-6},
     PlotRange -> All,
     Frame -> True,
     FrameLabel -> (Style[#, 14, Bold] & /@
        {"α, coefficient", 
         "D, diameter of opening (µm)"}),
     ImageSize -> Medium,
     Epilog -> {Red, Thick, 
       Line[{{#, 0}, {#, 
            QuantityMagnitude@
             UnitConvert[d[λ, f, R0, #, ΔT], "Micrometers"]}}] & /@
        {8.6*10^-6, 18*10^-6, 25*10^-6}}],
   3, R0 = 1; α = 8.6*10^-6;
   plt = Plot[
     UnitConvert[d[λ, f, R0, α, ΔTv], "Micrometers"],
     {ΔTv, 0.1, 1},
     PlotRange -> All,
     Frame -> True,
     FrameLabel -> (Style[#, 14, 
          Bold] & /@
        {"ΔT, temperature variation",
         "D, diameter of opening (µm)"}),
     Epilog -> {Red, Thick, 
       Line[{{ΔT, 0}, {ΔT, 
          QuantityMagnitude@
           UnitConvert[d[λ, f, R0, α, ΔT], "Micrometers"]}}]},
     ImageSize -> Medium]];
  Show@plt],
 {{λ, Quantity[514, "Nanometers"], "wavelength, λ"},
  {Quantity[514, "Nanometers"], Quantity[632, "Nanometers"], 
   Quantity[750, "Nanometers"]}},
 {{f, Quantity[2, "Centimeters"], "focal length, f"},
  {Quantity[2, "Centimeters"], Quantity[10, "Centimeters"], 
   Quantity[15, "Centimeters"]}},
 {{α, 8.6*10^-6, "coefficient, α"}, {8.6*10^-6 -> 
    EngineeringForm[8.6*10^-6], (18*10^-6) -> 
    EngineeringForm[18.*10^-6], (25*10^-6) -> EngineeringForm[25.*10^-6]}},
 {{R0, 5.5, StringForm["aperture radius, `` (mm)", Subscript[R, 0]]}, 1, 10, 
  0.1, Appearance -> "Labeled"},
 {{ΔT, 0.1, "temperature variation, ΔT"}, 0.1, 1, 
  0.01, Appearance -> "Labeled"},
 {{calc, 1, "calculation"}, {1 -> 
    StringForm["vary ``; α and ΔT fixed", Subscript[R, 0]],
   2 -> StringForm["vary α; `` and ΔT fixed", Subscript[R, 0]],
   3 -> StringForm["vary ΔT; `` and α fixed", Subscript[R, 0]]},
  ControlType -> PopupMenu}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.