You are ignoring the input and always calculating the same thing.
If you were to not ignore the inputs, then:
Those would become 0 when X(1) become 0.0014 and 0.0075 . Your fval calculation multiplies the first term by thick_i and the second term by thick_o so the two terms can both become exactly 0 . Is it possible to do better? Perhaps, since weight_testvariable(ub) comes out negative.
So then let us try
X = sym('x', [1 3]);
[c,ceq] = constraint_new(X)
[ x1 - 7/5000, x2 - 3/400, 27/5000 - x2]
Woah! Why did ceq, the equality constraint, come out as a value that is independent of the inputs [x1,x2,x3] ?
function [c,ceq] = constraint_new(X)
Looks like the input is being coped into D_* variables,
and the D_* variables are being passed into heatload1_new, so the problem must be in heatload1_new
so the D_* variables make it to inside heatload1_new
... and you create a vector of constant X values and use those constants to overwrite the D_* variables. So the D_* variable values that were passed into heatload1_new() become irrelevant and heatload1_new() always returns the same value independent of its inputs. Therefore the ceq constraint always ends up calculating the same thing independent of the inputs to the nonlinear constraint function. And that value is about -3.24, which can never be 0, so it is impossible for the equality constraint to be satisfied.