Reputation: 13
I'm having some trouble solving this. Matlab always returns a empties syms variables (H, d, k and L), but I know there is a solution because I've already solve it with another program. I need to solve this one at matlab though. Some idea of what I can change?
Thanks!
clear all
syms H d k L
%parameters values
ro = 1020; % kg/m^3 - seawater
g = 9.81; % m/s^2
T = 10; % s
z = d;
s = 0; % =d+z, with z=-d;
teta = 0;
%equations definitions
omega = sqrt(k*g*tanh(k*d));
pressureStokes = -ro*g*z + 0.5*ro*g*H*cosh(k*s)/cosh(k*d)*cos(teta) + 3/4*ro*g*H*pi*H/L/sinh(2*k*d)*(cosh(2*k*s)/sinh(k*d)^2-1/3)*cos(2*teta) - 1/4*ro*g*H*pi*H/L/sinh(2*k*d)*(cosh(2*k*s)-1);
%equations to solve
eq1 = omega == 2*pi/T;
eq2 = k == 2*pi/L;
eq3 = pressureStokes == 86.7e3;
eq4 = pressureStokes == 124.4e3;
[H,d,k,L] = vpasolve([eq1,eq2,eq3,eq4],[H d k L],[5 10 0.07 90]);
Upvotes: 0
Views: 635
Reputation: 2149
The system contains the equations pressureStokes == 86.7e3;
and pressureStokes == 124.4e3;
that can not be satisfied at the same time
Upvotes: 1