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

Fortran Subroutine Error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 8
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: 10,959
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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: 8
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: 10,959
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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: 168
Rep Power: 8
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: 8
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: 168
Rep Power: 8
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: 8
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: 71
Rep Power: 8
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: 8
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: 71
Rep Power: 8
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: 8
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, 07: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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18: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 10: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 14, 2003 23:19


All times are GMT -4. The time now is 16:07.