Is it possible to declare (or re-declare) components depending on the value of a time-dependent variable (as opposed to parameter)? The conditional declaration has been discussed here several times (for example, # 1 , # 2 and No. 3 ), however, in these examples the condition depends on the parameter.
My situation is this: I have two models, NaturalConvectionHeatTransferand ForcedConvectionHeatTransferthat extend from the same interface PartialHeatTransfer. In the third model, I would like to do something like this:
model MyProblem
// stripped other declarations
input v "Velocity of fluid flow";
replaceable PartialHeatTransfer heatTransfer;
equation
if v == 0 then
// redeclare heatTransfer to be of type NaturalConvectionHeatTransfer
else
// redeclare heatTransfer to be of type ForcedConvectionHeatTransfer
end if;
end MyProblem;
Component blah if v==0;, , , v . ? , "", . , , - , . , , .