First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

Conversion of uexc.flx flecs code to uexc.for fortran code

asked Oct 7 '0

Is there any tool or script available for conversion of flecs code to fortran code. ?

In the google drive link that I got from this site, I found that this can be done using * FLECS32 ( LIBmaker.bat)*

Can anyone help with how to do this translation of code.

Thanks in advance

2 answers

Sort by » oldest newest most voted
1

answered Oct 7 '0

jconto gravatar image

To translate from *.flx to *.f outside PSSe, save the following to a file "flecs.bat" and run it against your code:

@rem FLECS.bat - Translate flecs code *.flx to fortran66 *.f
@rem run as c:\..>flecs uexc
@ECHO OFF
IF "%1"=="" (
   ECHO "Enter flex filename [no ext, expected .flx] to be translated to .f"
   GOTO FIN )
@rem the -C option preserves the comments in .flx
@ECHO ON
FLECS32 "%1" -C -L NO -F "%1.F" -W 132 -F77
:FIN
@ECHO "Flecs ends"
link

Comments

Thanks for you reply. Can you please suggest how to run this againt my code. While am trying to run a flecs.bat file the new screen gets popup but I couldn't find any translation of Fortran code Can you please help me with this

Berwin gravatar imageBerwin (Oct 7 '0)

Search the net for "Batch files" for more info. Open CMD window (=DOS window) using the link created by PSSe during installation. In the DOS window just enter you flxcode name without extension as:c:\..>flecs flxcode

jconto gravatar imagejconto (Oct 7 '0)

Thanks, I have tried the same, Unfortunately for me its showing error as 'flecs' is not recognized as an internal or external command, operable program or batch file.

Berwin gravatar imageBerwin (Oct 7 '0)

The saved 'flecs.bat' acts as a command. Did you open a DOS window with the PSSe link? This link set up path for PSSe to run. If so, type 'PSSe' to check that it works ok. Once in the DOS window, change directory to your working folder using: CD c:\xx\yy\workingfolder and try flecs again.

jconto gravatar imagejconto (Oct 7 '0)

yes it worked :) great thanks

Berwin gravatar imageBerwin (Oct 8 '0)
1

answered Oct 7 '0

perolofl gravatar image

updated Oct 7 '0

That conversion is made every time a flecs model is compiled in PSSE. However, the resulting code is old-fashioned with a lot of GOTO statements, no comments, etc. That code should not be used as source code because it in in practise "un-readable"! But, it serves to feed the fortran-compiler...

The Environment Manager uses the following argument:

flecs32 "xxx.flx" -L NO -F "C:\Users\yyy\.pssenvmgr\xxx.f" -W 132 -F77
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Oct 7 '0

Seen: 750 times

Last updated: Oct 07 '20