Optimization and heat transfer model parameter estimation (rho, K, and Cp)

Dear experts,
I'm working on a heat transfer model (finite difference method). I have a measured data and I want to fit the model by estimating the input parameters (rho, K, and Cp). Which optimization tool (fmincon, fminbnd, fminsearch, lsqnonlin, etc.) is more suitable to estimate the parameters?
Thank you.

11 Comments

You might be able to estimate alpha = lambda/(rho*cp), but it will be impossible to estimate the three material parameters separately. At least not with the help of a heat transfer model.
Thank you, Torsten.
In my case, it will not be possible to estimate alpha.
In heat transfer problems, estimating thermal diffusivity "a", defined as lambda/(rho*cp), is the only possible material parameter that can be estimated. Again: it is not possible to find estimates of lambda, rho and cp as separate values.
The heat transfer problem I am trying to solve has boundary conditions. The BC equations cannot only express in term of thermal diffusivity but also in term of thermal conductivity. Only the interior nodes can express in term of "alpha".
So you know a heat transfer coefficient at the boundary, but you don't know the thermal conductivity of the material ? In this case, you have two independent parameters to be estimated: lambda and rho*cp (or lambda and a).
But you should have arranged the experiments such that you could use a Dirichlet boundary condition (constant temperature) instead of a boundary condition involving heat flux in your heat transfer model.
This is what my heat transfer implementation looks like. The last term in the boundary condition has "k" which makes it impossible to just estimate "alpha" because "k", "rho", and "cp" are all guess parameters. And I don't think Dirichlet BC will work in my case.
for t = 1:length(tmesh)-1
Nb = hc(t)*dx/k; % biot number
alpha = k/(rho*cp); % thermal diffusivity
Fo = alpha*dt/dx^2;
%BCs
u(1,t+1) = u(1,t)*(1-2*Fo*(Nb+1)) + 2*Fo*(u(2,t) + Nb*Ta(t))+2*alpha*dt/(k*dx)*q(t);
u(Nx,t+1) = u(Nx-1, t);
%interior nodes
for i=2:Nx-1
u(i,t+1) = u(i,t) + Fo*(u(i+1,t) - 2*u(i,t) + u(i-1,t));
end
end
As said, if you have performed experiments that don't allow a Dirichlet boundary condition in your heat transfer model (what a pity), you should introduce alpha and k as parameters to be estimated. rho and cp cannot be estimated separately because they always enter your model as product rho*cp.
And I'd suggest using "pdepe" instead of your self-written integrator for the heat transfer model.
Torsten,
I get it now. I didn't know the product rho*cp cannot be estimated separately.
Thanks for pointing that out and for the advice.
Does that mean if I use "pdepe", it won't be necessary to estimate k?
I didn't know the product rho*cp cannot be estimated separately.
You can only estimate the product as one unknown parameter, not rho and cp separately as two unknown parameters. I already mentionned the reason: rho and cp are always used together as the product rho*cp in your model, and there are infinitly many combinations of rho and cp that would give a certain value as their product.
Does that mean if I use "pdepe", it won't be necessary to estimate k?
You will also have to estimate k if you use "pdepe", but you have a reliable integrator which is very important if you want to use its results to estimate parameters with one of the MATLAB tools @Raj suggested.

Sign in to comment.

 Accepted Answer

The choice of optimization tool depends on several factors including the nature of problem, the characteristics of model, and the specific requirements you have for the optimization process.
  1. fmincon- This function is suitable when your optimisation problem has constraints.If your parameters (rho, K, and Cp) satisfy certain bounds or constraints, fmincon might be a good option.
  2. fminbnd- This function is is designed for univariate function minimization bounded within a specified range. It is not directly applicable to your case since you are optimizing over multiple parameters.
  3. fminsearch- This function finds the minimum of an unconstrained multivariable function. If your problem does not require handling constraints explicitly, it can be an option.
  4. lsqnonlin- This function minimizes the sum of squares of nonlinear functions and is particularly suitable for data fitting problems. If your objective function can be expressed as the sum of squares of residuals between the model predictions and measured data, this can be a strong candidate.
Given that you want to fit a heart transfer model to measured data,and you're estimating parameters like density (rho), thermal conductivity (K), and specific heat capacity (Cp), 'lsqnonlin' seems the most suitable option due to its focus onnonlinear least squares problem.
However for a better understanding on the above functions, refer to the following documentation-
  1. fmincon- https://www.mathworks.com/help/optim/ug/fmincon.html
  2. fminbnd- https://www.mathworks.com/help/matlab/ref/fminbnd.html
  3. fminsearch- https://www.mathworks.com/help/matlab/ref/fminsearch.html
  4. lsqnonlin- https://www.mathworks.com/help/optim/ug/lsqnonlin.html
Hope you have a better idea now and are able to proceed further!

More Answers (0)

Categories

Find more on Optimization in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!