function y = criticalityCondition(h);
Bz1=0.0159; Bz2=0.0321; H=380;
y = 1/Bz1*tan(Bz1*h)+1/Bz2*tanh(Bz2*(H-h));