forked from BattMoTeam/BattMo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ThermalModel.m
38 lines (26 loc) · 1.12 KB
/
ThermalModel.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
classdef ThermalModel < BaseModel
methods
function model = registerVarAndPropfuncNames(model)
model = registerVarAndPropfuncNames@BaseModel(model);
varnames = {};
% Temperature
varnames{end + 1} = 'T';
% Accumulation term
varnames{end + 1} = 'accumTerm';
% Flux flux
varnames{end + 1} = 'flux';
% Heat source
varnames{end + 1} = 'source';
% Energy conservation
varnames{end + 1} = 'energyCons';
model = model.registerVarNames(varnames);
fn = @ThermalModel.updateFlux;
model = model.registerPropFunction({'flux', fn, {'T'}});
fn = @ThermalModel.updateAccumTerm;
model = model.registerPropFunction({'accumTerm', fn, {'T'}});
fn = @ThermalModel.updateEnergyCons;
inputnames = {'accumTerm', 'flux', 'source'};
model = model.registerPropFunction({'energyCons', fn, inputnames});
end
end
end