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]]
g[x_?NumericQ][v_?NumericQ] :=...
, then you can express the minimum as a function of v. $\endgroup$