Help me convert this Equation

i converted this equation before and got this figure.
I forgot how but i lost the file that i wrote the code to get the figure above.
below i am trying to rewrtie it but it is not working. the exponential function is zero or infinity.
Edit!
this is the original equation for the R_e.
i checked the parameters with my report and they are the same.
maybe there is a problem here too?
i did what you asked about the final denominator, still the same results.
clc
Contact_angle = 2.4783666516568;
Volume = 5;
ST_L = 72;
Density = 0.973;
Gravity = 9.807;
Shape_factor = 37.1;
T_zero = 0;
Dynamic_viscosity = 8.9e-4;
R_e = ( 4*Volume / (pi*Contact_angle) )^1/3;
T = 0:0.1:6;
R = R_e*(1 - exp(-(2*ST_L/R_e^12 + Density*Gravity/(9*R_e^10))*(24*Shape_factor*Volume^4*(T+T_zero)/(pi^2*Dynamic_viscosity)))).^(1/6);
plot(T,R);
Thank you All for the help

8 Comments

You need to club the pi^2*neta together in the denominator to correct the definition.
But even after the correction, the result is not similar to the figure above. Are you sure the values are correct?
%Value edited
Contact_angle = 2.4783666516568;%142
Volume = 5;
ST_L = 72;
Density = 0.973;
Gravity = 9.807;
Shape_factor = 37.1;
T_zero = 0;
Dynamic_viscosity = 8.9e-4;
R_e = ( 400*Volume / (pi*Contact_angle))^(1/3);
%T according to the figure
T = 0:6;
R = R_e*(1 - exp(-(2*ST_L/R_e^12 + Density*Gravity/(9*R_e^10))*24*Shape_factor*Volume^4*(T+T_zero)/(pi^2*Dynamic_viscosity))).^(1/6);
plot(T,R)
the resutls should be in mm or m. i tried converting all of them but i am still facing the same problem
What are the units of each parameter used?
Volume = mm^3;
ST_L = mN/m;
Density = 0.973g/cm^3;
Gravity = m/s^2;
Shape_factor = 1/m;
Dynamic_Viscosity = Pa s
After correcting the units, you get a similar graph -
%Converting to SI units
Contact_angle = 142*pi/180;
Volume = 5 * 1e-9; %m^3;
ST_L = 72 * 1e-3; %N.m
Density = 0.973 * 1e3; %kg/m^3
Gravity = 9.807;
Shape_factor = 37.1;
T_zero = 0;
Dynamic_viscosity = 8.9e-4;
R_e = ( 400*Volume / (pi*Contact_angle))^(1/3);
%T according to the figure
T = 0:6; %seconds
R = R_e*(1 - exp(-(2*ST_L/R_e^12 + Density*Gravity/(9*R_e^10))*24*Shape_factor*Volume^4*(T+T_zero)/(pi^2*Dynamic_viscosity))).^(1/6);
%Convert R to mm
plot(T,R*1e3)
thank you so much. its working.
However,
why are you multiplying v by 400 in the R_e equation?
also in my experiment, the final radius reaches a value around 5 just like the original figure
The 400 is likely because that is what was in your original post before it was edited.
yeah sorry its not as the original equation. check the updated question

Sign in to comment.

Answers (3)

Edit: There are two correction in the equation. Thanks @Walter Roberson for pointing out.
% Parameters
Contact_angle = 2.4783666516568;
Volume = 5;
ST_L = 72;
Density = 0.973;
Gravity = 9.807;
Shape_factor = 37.1;
T_zero = 0;
Dynamic_viscosity = 8.9e-4;
R_e = ( 4*Volume / (pi*Contact_angle) )^1/3;
% suggest to split up the terms
T = linspace(0,6e-12, 601);
f5 = 24*Shape_factor*Volume^4*(T + T_zero)/((pi^2)*Dynamic_viscosity); % <--- correction
f4 = (Density*Gravity)/(9*(R_e^10));
f3 = (2*ST_L)/(R_e^12);
f2 = f3 + f4;
f1 = - f2*f5;
R = R_e*(1 - exp(f1)).^(1/6); % <--- correction
plot(T, R), grid on, xlabel('T')

1 Comment

Thank you for the correction. it gave me a good start on the initial rate that the radius will start increasing exponentially from. however there is still problem that the function is not increasing. (the exponent part is 0).
I dont understand why this is happening. i edited my problem with more information if you need it.

Sign in to comment.

x^1/3 means (x^1) divided by 3 which is x/3 . If you want to raise to the power of 1/3 you need x^(1/3)
Watch out for ^1/6 for the same issue.

1 Comment

Walter, I did implement this in the code in my comment, and it still doesn't give any similar result to what OP achieved earlier.

Sign in to comment.

As written, you need to either include your final denominator in parentheses, or divide by Dynamic_Viscocity.
We have to take the rest of the parameters you have given as correct. One potential error to look into - should your angles be in radians instead of degrees?
Contact_angle = 142;
Volume = 5;
ST_L = 72;
Density = 0.973;
Gravity = 9.807;
Shape_factor = 37.1;
T_zero = 0;
Dynamic_viscosity = 8.9e-4;
R_e = ( 400*Volume / (pi*Contact_angle))^1/3;
T = 0:300;
R = R_e * ( 1 - exp(-(2*ST_L/R_e^12 + (Density*Gravity) / (9*R_e^10))*24*Shape_factor*Volume^4*(T+T_zero)/(pi^2*Dynamic_viscosity))).^(1/6);
plot(T,R);

6 Comments

this is the original equation for the R_e.
i checked the parameters with my report and they are the same.
maybe there is a problem here too?
i did what you asked about the final denominator, still the same results.
clc
Contact_angle = 2.4783666516568;
Volume = 5;
ST_L = 72;
Density = 0.973;
Gravity = 9.807;
Shape_factor = 37.1;
T_zero = 0;
Dynamic_viscosity = 8.9e-4;
R_e = ( 4*Volume / (pi*Contact_angle) )^1/3;
T = 0:0.1:6;
R = R_e*(1 - exp(-(2*ST_L/R_e^12 + Density*Gravity/(9*R_e^10))*(24*Shape_factor*Volume^4*(T+T_zero)/(pi^2*Dynamic_viscosity)))).^(1/6);
plot(T,R);
the value of R_e here is the most accurate to my experiment
It's likely an issue with inconsistent units. It might be worth doing a dimensional analysis to be sure you are consistent.
But why the exponential function becomes zero?
I also suspect you are using the wrong equation to reproduce the plot you have shared. The equation you have shared is for the partial wetting condition. I wonder if you shouldn't be using the complete wetting situation equation.
See here.
Using that equation, I produced the following curve. I did have to make some assumptions about units, and adjusted the time scale to match the plot you shared.
The exponential function becomes 0 because that's what happens when you raise e to a larger and larger negative number.
exp(0)
ans = 1
exp(-0.1)
ans = 0.9048
exp(-1)
ans = 0.3679
exp(-10)
ans = 4.5400e-05
Because the entire expression 1-exp(...) is multiplied by , as time increases, your result will approach .
If it happens to be doing that quicker or slower than expected, check your units.
i understand thanks

Sign in to comment.

Categories

Products

Release

R2022b

Asked:

on 4 Apr 2023

Commented:

on 4 Apr 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!