thermal conductivity, pde toolbox

14 visualizzazioni (ultimi 30 giorni)
juan ugalde
juan ugalde il 12 Ott 2018
Commentato: Ravi Kumar il 22 Ott 2018
Dear all,
I have a question concerning the pde tool box. Indeed, I would like to model the thermal behaviour of a cyclindrical battery. For said purpose, I would like to specify the thermal conductivities in the x and y directions. How can I specify said parameters using the following code?
specifyCoefficients(Thermal, 'm',0,...% 'd',(para.rho)/para.cp,...%rho*cp 'c',???,...%k 'a',0,...%0 'f',Heat)%source
Thanks in advance.

Risposta accettata

Ravi Kumar
Ravi Kumar il 15 Ott 2018
Hi Juan,
I recommend using the new ThermalModel workflow.
In the ThermalModel based workflow you can use the function thermalProperties to define thermal conductivity, mass density, and specific heat, all of which can also be function spatial coordinates (x,y) and the temperature itself (nonlinear).
For example if your thermal conductivity is linear function of x & y, then you can define the thermal conductivity as a function:
function k = kFunc(region,state)
k = 1 + 0.1*region.x + 0.01*region.y;
end
You can then specify kFunc in thermalProperties function as in the example below:
model = createpde('thermal','transient');
importGeometry(model,'Block.stl');
thermalProperties(model,'ThermalConductivity',@kFunc,'MassDensity',1,'SpecificHeat',1)
generateMesh(model);
thermalBC(model,'Face',1,'Temperature',1)
thermalIC(model,0);
R = solve(model,[0,0.01])
pdeplot3D(model,'ColorMapData',R.Temperature(:,2))
Regards, Ravi
  3 Commenti
Ravi Kumar
Ravi Kumar il 15 Ott 2018
Hi Juan,
You should be able to use ThermalModel workflow in R2017a version of MATLAB.
Regards,
Ravi
juan ugalde
juan ugalde il 16 Ott 2018
Dear Ravi,
If the radial thermal conductivity (x) is equal to 0.15(W/m.K) and the axial(y) is equal to 30, is the following code correct?
function k = kFunc(region,state)
k = 0.15*region.x + 30*region.y;
end
Moreover, can I specify a heat source, f, such as
function f = fFunc(region,state)
f = 2*state.t;
end
where the heat source increases as time goes by?
Thanks again.
Juan.

Accedi per commentare.

Più risposte (1)

Ravi Kumar
Ravi Kumar il 16 Ott 2018
Hi Juan,
Looks like you have orthotropic thermal conductivity, not spatially varying conductivity. in that case, you can just use the matrix form of thermal conductivity, k = [0.15, 0 ; 0, 30].
thermalProperties(model,'ThermalConductivity',k,'MassDensity',1,'SpecificHeat',1)
Note if the problem is in 3-D space, then you need to specify a 3x3 matrix of conductivity. You don't need a function for the case you describe now.
You can specify heat source as a function of time using the function fFunc. Note that you can specify such heat source as internalHeatSource, if it is a domain heat source. If it is a boundary heat input, then you need to use 'HeatFlux' option of thermalBC function.
Regards,
Ravi
  2 Commenti
juan ugalde
juan ugalde il 17 Ott 2018
Dear Ravi,
Thanks again for your replies, these are very useful. I have a new question regarding the heat source function. Indeed, when I use the following code
function heatSourceValue = heatSourceFun(location,state)
heatSourceValue= 2*state.time
end
I receive an error that I have seen before in the forum: coefficient evaluation function, "heatSourceFun", was requested to calculate coefficients at 1500 locations so should have returned a matrix with 1500 columns. Instead it returned a matrix with 1 columns.
I then changed the code to
heatSourceValue= 2*state.time*ones(size(location.x))
It works also with location.y. However, I don't understand what it physically means. Could you please explain me?
My aim is to use state.time to compute the heat from an external function such as
heatSourceValue= myheatfunction(state.time)
That I defined using data from several experiments.
Thanks again.
Juan.
Ravi Kumar
Ravi Kumar il 22 Ott 2018
Hi Juan,
I think you might have figured out answer for your question by now. Solver works by discretization of the domain. So, solver needs value of heat source at several points on the boundary. The coordinates points at which heat source should be provided by the user are passed to the function as location.x, location.y, etc. So what you have done is correct.
Regards,
Ravi

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by