Ask Your Question
0

User Written Generator Model

asked 2018-04-24 03:24:24 -0500

anjumrm gravatar image

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?

edit retag flag offensive close merge delete

Comments

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.

perolofl gravatar imageperolofl ( 2018-04-25 01:57:40 -0500 )edit

Can VAR's hold complex numbers?

anjumrm gravatar imageanjumrm ( 2018-04-25 02:35:27 -0500 )edit

No, only real numbers. To transfer a complex number you need two VARs.

perolofl gravatar imageperolofl ( 2018-04-25 03:36:50 -0500 )edit

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

anjumrm gravatar imageanjumrm ( 2018-04-25 03:54:25 -0500 )edit

Yes, the code is correct.

perolofl gravatar imageperolofl ( 2018-04-25 04:59:53 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-04-25 03:40:53 -0500

perolofl gravatar image

A model can get the starting index for another plant model with MDLIND subroutine. Example on how to get the first VAR index for a generator model:

CALL MDLIND(IBUS, ID, 'GEN', 'VAR', IVAL, IERR)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2018-04-24 03:24:24 -0500

Seen: 91 times

Last updated: Apr 25