I've got this strange parametric function and I want to implement it on Mathematica. I know that I could use Excel and calculate it, but my database is quite large and I want to do some reproducible code. So, this is part of my dataset:
data = {{"M", "tr", "tb", "type" },
{556.35, 0.535904, 349.79, "methane"},
{556.35, 0.526917, 349.79, "methane"},
{556.35, 0.544891, 349.79, "methane"},
{556.35, 0.512537, 349.79, "methane"},
{561.6, 0.557603, 356.594, "ethane" },
{561.6, 0.57541, 356.594, "ethane" },
{535.5, 0.603455, 344.12, "propane"},
{535.5, 0.610644, 344.12, "propane"}};
and these are my parameters:
(*if methane if ethane if propane*)
α = {8.9669, 6.436, 2.532};
β = {0.952, 0.764, 0.548};
γ = {8.111, 5.771, 2.395};
a = {0.60, 0.66, 0.55 };
a1 = {3.357, 0.987, 1.977};
I want to implement this function:
A = a1*tb^α/(M^beta*tc^γ);
fi = 1.6;
λ = A*(Sqrt[5]*(fi - tr)^2/(fi + tr))^a
where tb, M, tc are the values contained in the data and alfa, beta gamma, a and a1 vary with the type of fluid. I've used the functions Piecewise or If, but it is too complex for me! Thanks in advance.
beta
andtc
are undefined? $\endgroup$