Answer Question
How to initialize complex numbers in the script section in PSCAD?
Hi All,
I am designing a relay component in PSCAD.
I need to work with complex numbers as part of the algorithm implementation in PSCAD component script section.
I am trying to initialze the complex variable using the following line of Fortan code:
"impCV = complex(rmsVPuRe,rmsVPuImg)"
where impCV is a complex variable,
rmsVPuRe,rmsVPuImg are real variable names
After the initialization i'm trying to obtain the imaginary part of the complex number using the following code:
"$bmStatus = aimag(impCV)"
but i am getting an error message that "z argument of aimag(Z) should be Complex"
Is there any other way to declare and assign values to a complex type in Fortran 90 in the script section of PSCAD.
Any help is much appreciated.
Thank you.
Warm Regards,
Lakshmi.
I am designing a relay component in PSCAD.
I need to work with complex numbers as part of the algorithm implementation in PSCAD component script section.
I am trying to initialze the complex variable using the following line of Fortan code:
"impCV = complex(rmsVPuRe,rmsVPuImg)"
where impCV is a complex variable,
rmsVPuRe,rmsVPuImg are real variable names
After the initialization i'm trying to obtain the imaginary part of the complex number using the following code:
"$bmStatus = aimag(impCV)"
but i am getting an error message that "z argument of aimag(Z) should be Complex"
Is there any other way to declare and assign values to a complex type in Fortran 90 in the script section of PSCAD.
Any help is much appreciated.
Thank you.
Warm Regards,
Lakshmi.