Skip to main content
Added greek alphabet instead of \[Alpha]
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. vv between 0.9150.915 and 1.51.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do[]Do does not seem to work in this case. Any help would be greatly appreciated!

k = 15.75;
α = 5.79*10^-6;
T = 1015;
η = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T 
 == (
Quiet[ FindRoot[T == (η Q)/(2 π k Sqrt[x^2 + y^2 + z^2])**Exp[ 
  Exp[                                        (-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 α)], 
                   {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x]Plot[ g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do[] does not seem to work in this case. Any help would be greatly appreciated!

k = 15.75;
α = 5.79*10^-6;
T = 1015;
η = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T == (
  η Q)/(2 π k Sqrt[x^2 + y^2 + z^2])*
  Exp[(-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 α)], {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do does not seem to work in this case. Any help would be greatly appreciated!

k = 15.75;
α = 5.79*10^-6;
T = 1015;
η = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] :=  
  Quiet[ FindRoot[T == (η Q)/(2 π k Sqrt[x^2 + y^2 + z^2])*Exp[ 
                                          (-v (x + Sqrt[x^2 + y^2 + z^2]))/(2 α)], 
                   {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[ g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do[] does not seem to work in this case. Any help would be greatly appreciated!

k = 15.75;
\[Alpha]α = 5.79*10^-6;
T = 1015;
\[Eta]η = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T == (
  \[Eta]η Q)/(2 \[Pi]π k Sqrt[x^2 + y^2 + z^2])*
  Exp[(-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 \[Alpha]α)], {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do[] does not seem to work in this case. Any help would be greatly appreciated!

k = 15.75;
\[Alpha] = 5.79*10^-6;
T = 1015;
\[Eta] = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T == (
  \[Eta] Q)/(2 \[Pi] k Sqrt[x^2 + y^2 + z^2])*
  Exp[(-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 \[Alpha])], {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do[] does not seem to work in this case. Any help would be greatly appreciated!

k = 15.75;
α = 5.79*10^-6;
T = 1015;
η = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T == (
  η Q)/(2 π k Sqrt[x^2 + y^2 + z^2])*
  Exp[(-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 α)], {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]
added 98 characters in body
Source Link
Jack
  • 33
  • 3

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do[] does not seem to work in this case, and I am unable to set up manipulate on any of the parameters with how I have the equation written. Any help would be greatly appreciated!

k = 15.75;
\[Alpha] = 5.79*10^-6;
T = 1015;
\[Eta] = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T == (
  \[Eta] Q)/(2 \[Pi] k Sqrt[x^2 + y^2 + z^2])*
  Exp[(-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 \[Alpha])], {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). However Do[] does not seem to work in this case, and I am unable to set up manipulate on any of the parameters with how I have the equation written. Any help would be greatly appreciated!

k = 15.75;
\[Alpha] = 5.79*10^-6;
T = 1015;
\[Eta] = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T == (
  \[Eta] Q)/(2 \[Pi] k Sqrt[x^2 + y^2 + z^2])*
  Exp[(-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 \[Alpha])], {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]

The following code successfully manages to plot the cross-section, and give me the maximum depth of a weld pool, for a given set of parameters. What I would ideally like to be able to do is to plot a graph of how the the maximum depth of a weld pool varies with a parameter (ie. v between 0.915 and 1.5). I think I am essentially looking to make a for loop so I can plug many different values for v in, However Do[] does not seem to work in this case. Any help would be greatly appreciated!

k = 15.75;
\[Alpha] = 5.79*10^-6;
T = 1015;
\[Eta] = 0.6;
Q = 600;
v = 0.915;
y = 0;

g[x_?NumericQ] := Quiet[FindRoot[T == (
  \[Eta] Q)/(2 \[Pi] k Sqrt[x^2 + y^2 + z^2])*
  Exp[(-v (x + Sqrt[x^2 + y^2 + z^2]))/(
   2 \[Alpha])], {z, -0.0001, -0.1, -0.0000001}][[1, 2]]]

p = Plot[g[x], {x, -0.00001, -0.0037}, Filling -> Axis, 
FillingStyle -> Orange, AspectRatio -> Automatic]

FindMinimum[g[x], {x, -0.001}][[1]]
Source Link
Jack
  • 33
  • 3
Loading