modelica - Conditional component declaration depending on time-dependent variable -



modelica - Conditional component declaration depending on time-dependent variable -

is possible declare (or re-declare) components depending on value of time-dependent variable (as opposed parameter)? conditional declaration has been discussed here numerous times (e.g., #1, #2 , #3), in examples, status depends on parameter.

my situation this: have 2 models, naturalconvectionheattransfer , forcedconvectionheattransfer extend same interface partialheattransfer. in 3rd model, this:

model myproblem // stripped other declarations input v "velocity of fluid flow"; replaceable partialheattransfer heattransfer; equation if v == 0 // redeclare heattransfer of type naturalconvectionheattransfer else // redeclare heattransfer of type forcedconvectionheattransfer end if; end myproblem;

a conditional declaration component blah if v==0; not work if v not parameter. there way accomplish goal? guess "no", meaning have re-think whole concept. however, perhaps sees obvious solution missing. suggestion how work around appreciated.

it not possible. can, however, model around adding both heattransfer components , switch between them using dummy components , equations.

http://dx.doi.org/10.3384/ecp14096183 has implementation hints on how in modelica inefficiently (and how tools optimize of things away).

modelica

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -