CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Fortran Subroutine Error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2009, 17:36
Default Fortran Subroutine Error
  #1
New Member
 
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17
sergiorbrett is on a distinguished road
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
sergiorbrett is offline   Reply With Quote

Old   November 12, 2009, 17:49
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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?
ghorrocks is offline   Reply With Quote

Old   November 12, 2009, 22:40
Default
  #3
New Member
 
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17
sergiorbrett is on a distinguished road
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
sergiorbrett is offline   Reply With Quote

Old   November 13, 2009, 05:48
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   November 17, 2009, 17:15
Default
  #5
Senior Member
 
Join Date: Mar 2009
Location: Europe
Posts: 169
Rep Power: 17
joey2007 is on a distinguished road
Did you use junction boxes for your solution? Looks bit like non-closed PUSHDIR - POPDIR.
joey2007 is offline   Reply With Quote

Old   November 17, 2009, 17:19
Default
  #6
New Member
 
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17
sergiorbrett is on a distinguished road
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
sergiorbrett is offline   Reply With Quote

Old   November 18, 2009, 14:37
Default
  #7
Senior Member
 
Join Date: Mar 2009
Location: Europe
Posts: 169
Rep Power: 17
joey2007 is on a distinguished road
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.
joey2007 is offline   Reply With Quote

Old   November 18, 2009, 17:42
Default
  #8
New Member
 
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17
sergiorbrett is on a distinguished road
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
sergiorbrett is offline   Reply With Quote

Old   November 18, 2009, 19:05
Default
  #9
Member
 
Ali Torbaty
Join Date: Jul 2009
Location: Sydney, Australia
Posts: 72
Rep Power: 17
AliTr is on a distinguished road
Quote:
Originally Posted by sergiorbrett View Post


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.

Last edited by AliTr; November 18, 2009 at 20:13.
AliTr is offline   Reply With Quote

Old   November 18, 2009, 21:04
Default
  #10
New Member
 
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17
sergiorbrett is on a distinguished road
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
sergiorbrett is offline   Reply With Quote

Old   November 18, 2009, 22:35
Default
  #11
Member
 
Ali Torbaty
Join Date: Jul 2009
Location: Sydney, Australia
Posts: 72
Rep Power: 17
AliTr is on a distinguished road
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.
AliTr is offline   Reply With Quote

Old   November 21, 2009, 17:18
Default
  #12
New Member
 
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17
sergiorbrett is on a distinguished road
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.
sergiorbrett is offline   Reply With Quote

Old   September 3, 2012, 08:40
Default for the same question
  #13
New Member
 
david
Join Date: Sep 2012
Posts: 1
Rep Power: 0
ship-david is on a distinguished road
Quote:
Originally Posted by sergiorbrett View Post
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
ship-david is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
attach/detach (valve opening/closing) phsieh2005 OpenFOAM Running, Solving & CFD 2 March 21, 2009 06:18
user defined function cfduser CFX 0 April 29, 2006 11:58
fortran error for g77 compiler vishwas Main CFD Forum 10 January 30, 2006 18:16
Problems of Duns Codes! Martin J Main CFD Forum 8 August 15, 2003 00:19


All times are GMT -4. The time now is 08:35.