CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Fortran Subroutine Error (http://www.cfd-online.com/Forums/cfx/70044-fortran-subroutine-error.html)

sergiorbrett November 12, 2009 17:36

Fortran Subroutine Error
 
Hi all

I am simulating the starting behavior of a wind turbine, using a Fortran subroutine, but i got errors from the solver. I could create the fortran program, compiled it and created the .lib, and other files.

Also I set a users subroutine, functions and expressions in the pre, but when i try to run it with the solver i got this error.

+--------------------------------------------------------------------+
| Job Information |
+--------------------------------------------------------------------+

Run mode: serial run

Host computer: DELL05
Job started: Thu Nov 12 16:41:31 2009

Details of error:-
----------------
Error detected by routine PEEKL
CDANAM = /FLOW/PHYSICS/ZN1 /LIMSOLID
CRESLT = NONE

Current Directory : /FLOW/CEL/CBCK_CALLS

+================================================= ===================+
| ****** PROBLEM REPORT ****** |
|--------------------------------------------------------------------|
| Subsystem: Input |
| Subroutine name: ErrAction |
| Severity level: Fatal Error |
| Error message number: 001100279 |
|--------------------------------------------------------------------|
| Message: |
| |
| Stopped in routine MEMERR |
| |
| |
| |
| |
| |
+================================================= ===================+

the subroutine is used to change the rotational velocity of the rotor of the wind turbine, so I calculate the rotational velocity taking into account the torque generated by the blade and the inertia of the rotor, and this value is used by the cfx solver to set the rotational velocity of the rotor.

I made a test running the case with the subroutine but, with a constant rotational velocity (72 rpm), and both the solver and the subroutine worked fine, that is why i think the problem could be the way how I set the users function to set the velocity.

I would appreciate any comment.

Thanks

ghorrocks November 12, 2009 17:49

From what you describe I think you should be able to do this in CEL, so no need for fortran.

But to answer your question - the LIMSOLD comment is strange - are you using immersed solids or solid domains?

sergiorbrett November 12, 2009 22:40

hi ghorrocks,

I tried to do this simulation using CEL expressions, but I couldn't find a way to keep or to calculate a angular velocity of the rotor of the timestep n-1 that I need to calculate the angular velocity in the timestep n; the equation that I am using is:

Wnew=((Torque*DeltaT)/Inertia)+Wold.

I do not understand exactly what you want to know, I have a computational domain with 4 small domain, one static representing the enviroment conditions, and the other 3 form the rotor and spin at the angular velocity.

I do not know what is immersed solid or solid domains.

Thanks for answering

ghorrocks November 13, 2009 05:48

On second thought I guess the error is associated with your fortran. I can't help you there, I have no experience with CFX fortran.

joey2007 November 17, 2009 17:15

Did you use junction boxes for your solution? Looks bit like non-closed PUSHDIR - POPDIR.

sergiorbrett November 17, 2009 17:19

Hi Joey,

I have a subroutine in Fortran, then I compiled it and used it with a users subroutine in cfx, I also created a user Function which I use to send information to the fortran subroutine and get the rotational velocity.

The rotational velocity of the domain is set by the user function value.

Thank

joey2007 November 18, 2009 14:37

I do not understand how you realized it???? I did some training on user fortran some years ago. As far as I understood the best way would be to store the value in MMS for user.

sergiorbrett November 18, 2009 17:42

Hi,

How do I realized what???, I just Followed the procedure of the tutorials, and what I told you was I understand the CFX and the subroutine make.

Regards

AliTr November 18, 2009 19:05

Quote:

Originally Posted by sergiorbrett (Post 236047)


Details of error:-
----------------
Error detected by routine PEEKL
CDANAM = /FLOW/PHYSICS/ZN1 /LIMSOLID
CRESLT = NONE

Current Directory : /FLOW/CEL/CBCK_CALLS

+================================================= ===================+
| ****** PROBLEM REPORT ****** |
|--------------------------------------------------------------------|
| Subsystem: Input |
| Subroutine name: ErrAction |
| Severity level: Fatal Error |
| Error message number: 001100279 |
|--------------------------------------------------------------------|
| Message: |
| |
| Stopped in routine MEMERR |

Firstly, when you used a fixed value, did you sent it through by your routin or just put it into your CFX-PRE?

if you sent it through by your routin, then I assume the routin comunication with CFX is fine, otherwise, what I can say, base on your quoted Error report, is that the PEEKL routin stops by a memory access Error.

if you used the PEEKL in your code, make sure it is the right choice for your variable type . they are several PEEK subroutines for different variable types, e.g. PEEKL for Logical, PEEKR for Real.

I noticed CRESLT=None , which also means that "the name passed to the subroutine could not be found". again check the input variables to PEEKL subroutine.

sergiorbrett November 18, 2009 21:04

Hi AliTr,

Whe I used a fixed value I set it in the PRE, by typing 72 rev min at each domain of the rotor; I have not tryed to make it with the subroutine.

I think the communication between the solver and the subroutine is working fine, because I created an expression in CEL called rotationvel and it takes the value of the rotacional velocity calculated by the subroutine, and I created a monitor which allow me to see how it veries with the timesteps.

rotationalvel = velocity(InertiaZ,Torque,tStep)

the user function velocity is defined to have the arguments [kg m^2], [Nm], [s] and the result in [rev min^-1].

I had no idea what the PEEKL is, but if this variable is used to logical, this could be the problem because I have a couple of conditional statements in my routine. I will check it and if this is the problem I let you know.

Thanks

AliTr November 18, 2009 22:35

just a quick hint. the line:
CDANAM = /FLOW/PHYSICS/ZN1 /LIMSOLID
is reffering to NZ1, which is your Domain 1, see if it ring any bell.

sergiorbrett November 21, 2009 17:18

Hola,

He encontrado la causa del error de que mi simulaciones produce. Parece ser un problema con ANSYS 12, he estado en contacto con soporte de ANSYS y me enviaron un ejemplo, he resuelto y tengo el mismo error: luego trató de hacerlo y fue el mismo problema. Así que el problema es ANSYS 12, estoy trabajando ahora con ANSYS 11 y la subrutina funciona bien.

Ahora, tengo una pregunta, cuando se utiliza una subrutina de usuario y una función de usuario, en qué momento se comunica CFX con FORTRAN, al comienzo, durante o al final de cada paso del tiempo.

En mi subrutine, tengo un comando para escribir un archivo. Txt durante la simulación, pero cuando corro un caso con 40 Timesteps, el archivo. Txt había cerca de 3500, entonces no entiendo cómo funciona la subrutina.

gracias.

ship-david September 3, 2012 07:40

for the same question
 
Quote:

Originally Posted by sergiorbrett (Post 236816)
Hi AliTr,

Whe I used a fixed value I set it in the PRE, by typing 72 rev min at each domain of the rotor; I have not tryed to make it with the subroutine.

I think the communication between the solver and the subroutine is working fine, because I created an expression in CEL called rotationvel and it takes the value of the rotacional velocity calculated by the subroutine, and I created a monitor which allow me to see how it veries with the timesteps.

rotationalvel = velocity(InertiaZ,Torque,tStep)

the user function velocity is defined to have the arguments [kg m^2], [Nm], [s] and the result in [rev min^-1].

I had no idea what the PEEKL is, but if this variable is used to logical, this could be the problem because I have a couple of conditional statements in my routine. I will check it and if this is the problem I let you know.

Thanks

Hello sergiorbrett:
I meet the same problem, so i want to know how you solve the problem finally. Someone tell me it may be the Fortran compiler's problem.So can you help me ?
ship-david


All times are GMT -4. The time now is 15:24.