Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

thermal conductor and capacitor parameter initialization

thermal conductor and capacitor parameter initialization

Hello all, i have made a 3d network of thermal conductors and heatcapacitors, where i normally initialise the G and C parameter when i load the object as follows:

Modelica.Thermal.HeatTransfer.Components.HeatCapacitor cellElement[N - 2, M - 2, K - 2](each C = cp * m /((N-2)*(M-2)*(K-2)));
Modelica.Thermal.HeatTransfer.Components.ThermalConductor Conductor_X[N - 1, M - 2, K - 2](each G = (lambda * Ax / (L / (N - 1)))/((M-2)*(K-2)));

now i want to make a "hole" in the 3d network: set C and G values to extrem small values, so that negletible heat transfer takes place.

i have tried to load the objects without parameter initialization, for example: Modelica.Thermal.HeatTransfer.Components.HeatCapacitor cellElement[N - 2, M - 2, K - 2]

and then tried to set the values with: cellElement[i, j, k].C = 0.001; in the inital equation section. but OpenModelica tells me that i have redundant initial conditions
Assuming redundant initial conditions for the following 187 initial equations:
         steelplate1.Conductor_Z[1,5,8].G = 0.001 and so on...

how can i set the parameter values in the equation section without having the problem to have redundant inital conditions?


Re: thermal conductor and capacitor parameter initialization

Parameters will be handled with fixed=true by default. Thus, if you don't set parameters explicitly, the start values (zero for C and G) will be used. If you want to compute parameters in the initial equation section, then you have to set these parameters to fixed=false. Otherwise the initial conditions are over-determined. 

Code:

Modelica.Thermal.HeatTransfer.Components.HeatCapacitor cellElement[N-2, M-2, K-2](each C(fixed=false));

There are 0 guests and 0 other users also viewing this topic
You are here: