Skip to content

Commit 792fd85

Browse files
committed
more clean up
1 parent d3ef632 commit 792fd85

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/data_assimilation/f_new.m

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function [t,X,tau_del] = f_new(ti_star,tf_star,xi,vars,tau_del)
22

33
% global NT Pext_type Pext_Amp_Freq disptime Tgrad Tmgrad ...
4-
% comp t0 neoHook nhzen sls linkv k chi fom foh We Br A_star ...
4+
% comp t0 neoHook nhzen sls linkv k chi Fom Foh We Br A_star ...
55
% B_star Rv_star Ra_star L L_heat_star Km_star P_inf T_inf C_star ...
66
% De deltaY yk deltaYm xk yk2 Pv REq D_Matrix_T_C DD_Matrix_T_C ...
77
% D_Matrix_Tm DD_Matrix_Tm Ca Re
@@ -21,8 +21,8 @@
2121
linkv=vars{13};
2222
k=vars{14};
2323
chi=vars{15};
24-
fom=vars{16};
25-
foh=vars{17};
24+
Fom=vars{16};
25+
Foh=vars{17};
2626
We=vars{18};
2727
Br=vars{19};
2828
A_star=vars{20};
@@ -61,7 +61,7 @@
6161
Uc = sqrt(P_inf/rho);
6262

6363
Br = xi(2*NT+NTM+5);
64-
foh = xi(2*NT+NTM+6);
64+
Foh = xi(2*NT+NTM+6);
6565

6666
% Ca = P_inf./(xi(2*NT+NTM+7));
6767
% Re = (P_inf*R0)./((xi(2*NT+NTM+8)).*Uc);
@@ -85,7 +85,7 @@
8585

8686
xf = [X(end,:)';
8787
Br;
88-
foh;
88+
Foh;
8989
xi(2*NT+NTM+7:end)];
9090
xf(3) = log(xf(3));
9191

@@ -160,7 +160,7 @@
160160
B = 1.17e-2; %(W/m-K)Thermal Conductivity coeff
161161
K_infy = A*T_inf+B;
162162
Dm = Km_star*(K_infy) ./ (rho*Cp);
163-
foh = Dm/(Uc*R0);
163+
Foh = Dm/(Uc*R0);
164164

165165
% This is commented out in this version for simplification
166166

@@ -213,9 +213,9 @@
213213
%***************************************
214214
% Internal pressure equation
215215
%pdot = 3/R*(Tgrad*chi*(k-1)*DTau(end)/R - k*P*U +...
216-
% + Cgrad*k*P*fom*Rv_star*DC(end)/( T(end)*R* Rmix(end)* (1-C(end)) ) );
216+
% + Cgrad*k*P*Fom*Rv_star*DC(end)/( T(end)*R* Rmix(end)* (1-C(end)) ) );
217217
pdot = 3/R*(Tgrad*chi*(k-1)*DTau(end)/R - k*P*U +...
218-
+ Cgrad*k*P*fom*Rv_star*DC(end)/( R* Rmix(end)* (1-C(end)) )) ;
218+
+ Cgrad*k*P*Fom*Rv_star*DC(end)/( R* Rmix(end)* (1-C(end)) )) ;
219219
% *****************************************
220220

221221
%***************************************
@@ -230,10 +230,10 @@
230230

231231
% Temperature of the gas inside the bubble
232232
% U_vel = (chi/R*(k-1).*DTau-yk*R*pdot/3)/(k*P);
233-
U_vel = (chi/R*(k-1).*DTau-yk*R*pdot/3)/(k*P) + fom/R*(Rv_star-Ra_star)./Rmix.*DC;
233+
U_vel = (chi/R*(k-1).*DTau-yk*R*pdot/3)/(k*P) + Fom/R*(Rv_star-Ra_star)./Rmix.*DC;
234234
first_term = ((DDTau ).*chi./R^2+pdot).*(K_star.*T/P*(k-1)/k);
235235
second_term = -DTau.*(U_vel-yk*U)./R;
236-
third_term = fom./(R.^2) *(Rv_star-Ra_star)./Rmix .* DC .*DTau;
236+
third_term = Fom./(R.^2) *(Rv_star-Ra_star)./Rmix .* DC .*DTau;
237237

238238
Tau_prime = first_term + second_term + third_term;
239239
% if Tmgrad == 0
@@ -248,18 +248,18 @@
248248

249249
%***************************************
250250
% Vapor concentration equation
251-
%U_mix = U_vel + fom/R*((Rv_star - Ra_star)./Rmix).*DC;
251+
%U_mix = U_vel + Fom/R*((Rv_star - Ra_star)./Rmix).*DC;
252252
%one = DDC;
253253
%two = DC.*(DTau./(K_star.*T)+((Rv_star - Ra_star)./Rmix).*DC );
254254
%three = (U_mix-U.*yk)/R.*DC;
255255
%
256-
% C_prime = fom/R^2*(one - two) - three;
256+
% C_prime = Fom/R^2*(one - two) - three;
257257
% C_prime(end) = 0;
258258
% C_prime = C_prime*Cgrad;
259259

260260
% Vapor concentration equation
261261
U_mix = U_vel;
262-
% + fom/R*((Rv_star - Ra_star)./Rmix).*DC;
262+
% + Fom/R*((Rv_star - Ra_star)./Rmix).*DC;
263263
one = DDC;
264264
% % JY!!! %
265265
%two = DC.*( -((Rv_star - Ra_star)./Rmix).*DC - DTau./(K_star.*T) );
@@ -271,16 +271,16 @@
271271

272272
three = (U_mix-U.*yk)/R.*DC;
273273

274-
% % JY!!! % C_prime = fom/R^2*(one - two) - three;
275-
C_prime = fom/R^2*(one+two) - three;
274+
% % JY!!! % C_prime = Fom/R^2*(one - two) - three;
275+
C_prime = Fom/R^2*(one+two) - three;
276276
C_prime(end) = 0;
277277
C_prime = C_prime*Cgrad;
278278
%*****************************************
279279

280280
%***************************************
281281
% Material temperature equations
282-
%first_term = (1+xk).^2./(L*R).*(U./yk2.^2.*(1-yk2.^3)/2+foh/R.*((xk+1)/(2*L)-1./yk2)).* DTm;
283-
%second_term = foh/R^2.*(xk+1).^4/L^2.*DDTm/4;
282+
%first_term = (1+xk).^2./(L*R).*(U./yk2.^2.*(1-yk2.^3)/2+Foh/R.*((xk+1)/(2*L)-1./yk2)).* DTm;
283+
%second_term = Foh/R^2.*(xk+1).^4/L^2.*DDTm/4;
284284
%third_term = 3*Br./yk2.^6.*(4/(3*Ca).*(1-1/R^3)+4.*U/(Re.*R)).*U./R;
285285
%Tm_prime = first_term+second_term+third_term;
286286
%Tm_prime(end) = 0; % Sets boundary condition on temp
@@ -289,8 +289,8 @@
289289
%Tm_prime = Tm_prime*Tmgrad; %Tmgrad makes this quantity zero
290290

291291
% Material temperature equations
292-
first_term = (1+xk).^2./(L*R).*(U./yk2.^2.*(1-yk2.^3)/2+foh/R.*((xk+1)/(2*L)-1./yk2)).* DTm;
293-
second_term = foh/(R^2).*(xk+1).^4/L^2.*(DDTm)/4; %JY???
292+
first_term = (1+xk).^2./(L*R).*(U./yk2.^2.*(1-yk2.^3)/2+Foh/R.*((xk+1)/(2*L)-1./yk2)).* DTm;
293+
second_term = Foh/(R^2).*(xk+1).^4/L^2.*(DDTm)/4; %JY???
294294
% % JY!!! third_term = 3*Br./yk2.^6.*(4/(3*Ca).*(1-1/R^3)+4.*U/(Re.*R)).*U./R;
295295

296296
third_term = 3*Br./yk2.^6.*(4.*U/(Re.*R)).*U./R;
@@ -567,7 +567,7 @@
567567

568568
Tauw =chi*(2*Km_star/L*(coeff*[TW(prelim); Tm_trans] )/deltaYm) +...
569569
chi*(-coeff*[prelim ;T_trans] )/deltaY + Cgrad*...
570-
fom*L_heat_star*P*( (CW(TW(prelim),P)*(Rv_star-Ra_star)+Ra_star))^-1 *...
570+
Fom*L_heat_star*P*( (CW(TW(prelim),P)*(Rv_star-Ra_star)+Ra_star))^-1 *...
571571
(TW(prelim) * (1-CW(TW(prelim),P)) ).^(-1).*...
572572
(-coeff*[CW(TW(prelim),P);
573573
C_trans] )/deltaY;

0 commit comments

Comments
 (0)