User Written Generator Model
If I am writing a model for a generator and I have blocks and equations such that the final quantity is a current (ISORCE). How do I incorporate it within the model and how do I set PELEC and QELEC? I feel like my approach is not correct. This is my first time writing a model. I have gone through the UEXC example but things are not clear to me.
Also, if I have certain VARs as the output of a model, is it possible to make them the input for another model or do I need to always use inbuilt arrays to pass quantities between models?
Regarding transfering a VAR to another user written model, the other model can have an ICON with the index to the VAR set by the generator model. In other words, the second model just needs to know the VAR index for the generator model.
Can VAR's hold complex numbers?
No, only real numbers. To transfer a complex number you need two VARs.
Thank you for your answers. They have been helpful. I have some more queries. You can answer if you have the time. Thanks again. Would this FORTRAN code segment be correct? VAR(L) = 2 __ VAR(L+1) = 3 __ ISORCE(II) = CMPLX( VAR(L), VAR(L+1) ), where II is the machine index
Yes, the code is correct.