Reputation: 11
I have experimental data on how diameter (D/D0) of a fluid filament thins over time (t). D/D0 (ydata) and t (xdata) are np arrays.
I would like to fit the data to the following equation:
In the equation, my known variables are D/D1 = D/D0, D1=D0, and t.
D/D0 = np.array([0.129 , 0.1613, 0.1935, 0.2258, 0.2581, 0.2903, 0.3226,0.3548, 0.3871, 0.4194, 0.4516, 0.4839, 0.5161, 0.5484, 0.5806, 0.6129, 0.6452, 0.6774, 0.7097, 0.7419, 0.7742, 0.8065, 0.8387, 0.871 , 0.9032, 0.9355, 1.])
t = np.array([0.7705, 0.7495, 0.5768, 0.5699, 0.503 , 0.493 , 0.4102, 0.3693, 0.3234, 0.2774, 0.2116, 0.2076, 0.1856, 0.1627, 0.1397, 0.1198, 0.0908, 0.0848, 0.0609, 0.0499, 0.0399, 0.0349, 0.0289, 0.02 , 0.012 , 0.007 , 0.002 ])
alpha, a, eta_0 and lambda are unknown to me and I would like to find these values and plot the equation with my experimental data.
How best can I achieve this in Python?
Upvotes: 0
Views: 638
Reputation: 1705
It is important to replace the three dependent parameters by only one independent parameter into the model equation. Then one can use any software for non-linear regression.
Upvotes: 1