How to apply a time decaying internal heat source?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi
I'm trying to model the decay of nuclear fuel following an accident, I need to be able to apply an equation for the decay heat produced by the fuel to the internal heat source of the model.
This is my current code with P being the equation that should represent the decay heat.
thermalmodel= createpde('thermal',"transient");
gm = multicylinder([4.655e-3 4.865e-3 5.59e-3],12.6e-3);
thermalmodel.Geometry = gm;
pdegplot(thermalmodel, "CellLabels",'on','FaceLabels','on',"FaceAlpha",0.2);
thermalProperties(thermalmodel,'Cell',1,'ThermalConductivity',7,"MassDensity",10.97, "SpecificHeat",370); % Uranium
thermalProperties(thermalmodel,'Cell',2,'ThermalConductivity',252.48e-3 ,"MassDensity",0.178e-3,"SpecificHeat",5.193); % Helium
thermalProperties(thermalmodel,'Cell',3,'ThermalConductivity', 21.5,"MassDensity",6.55,"SpecificHeat",0.328); % Zircalloy
tlist = (10:1:100);
for a = 1 : length(tlist)
P(a) = 100e6*0.066*((tlist(a).^(-0.2))- ((10*24*60*60)+tlist(a)).^(-0.2));
end
internalHeatSource(thermalmodel,P,"Cell",1);
thermalIC(thermalmodel,873);
generateMesh(thermalmodel);
pdemesh(thermalmodel);
tic
thermalresults = solve(thermalmodel,tlist);
toc
Tcenter = interpolateTemperature(thermalresults,0,0,0,1:numel(tlist))
plot(tlist,Tcenter)
0 commentaires
Réponses (1)
Ayush
le 16 Mai 2024
Modifié(e) : Ayush
le 16 Mai 2024
Hi James,
To apply a time decaying internal heat source to your provided code, you would need to implement a decay heat function which would then be referenced in the “internalHeatSource” function. Please refer to the below documentation to know more about “Specifying Nonconstant Parameters of a Thermal Model”:
From the above reference, here is a possible implementation of the mentioned decay heat function which will be based on the sum of exponentials or a single exponential term that represents the decay of fission products. Here is an example code for your reference:
function P = decayHeatFunction(location, state)
% Constants
P0 = 100e6; % Initial decay heat in Watts
alpha = 0.2; % Decay exponent
% Check if state.time is NaN (solver's check for time dependency)
if isnan(state.time)
P = nan; % Return NaN to indicate time-dependent problem
else
% Calculate decay heat for each time point
P = P0 * (state.time.^(-alpha));
end
% Ensure output is a row vector with the number of columns equal to the number of evaluation points
P = repmat(P, 1, length(location.x));
end
After implementing the decay heat function, you would have to pass it as an anonymous function that only takes location and state as inputs into the “internalHeatSource” function as follows:
internalHeatSource(model, "Face", 2, @decayHeatFunction);
Hope this helps!
0 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!