|
[Sponsors] |
November 12, 2009, 17:36 |
Fortran Subroutine Error
|
#1 |
New Member
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
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 |
|
November 12, 2009, 17:49 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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? |
|
November 12, 2009, 22:40 |
|
#3 |
New Member
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
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 |
|
November 13, 2009, 05:48 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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.
|
|
November 17, 2009, 17:15 |
|
#5 |
Senior Member
Join Date: Mar 2009
Location: Europe
Posts: 169
Rep Power: 17 |
Did you use junction boxes for your solution? Looks bit like non-closed PUSHDIR - POPDIR.
|
|
November 17, 2009, 17:19 |
|
#6 |
New Member
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
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 |
|
November 18, 2009, 14:37 |
|
#7 |
Senior Member
Join Date: Mar 2009
Location: Europe
Posts: 169
Rep Power: 17 |
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.
|
|
November 18, 2009, 17:42 |
|
#8 |
New Member
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
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 |
|
November 18, 2009, 19:05 |
|
#9 | |
Member
Ali Torbaty
Join Date: Jul 2009
Location: Sydney, Australia
Posts: 72
Rep Power: 17 |
Quote:
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. |
||
November 18, 2009, 21:04 |
|
#10 |
New Member
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
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 |
|
November 18, 2009, 22:35 |
|
#11 |
Member
Ali Torbaty
Join Date: Jul 2009
Location: Sydney, Australia
Posts: 72
Rep Power: 17 |
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. |
|
November 21, 2009, 17:18 |
|
#12 |
New Member
Sergio Brett
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
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. |
|
September 3, 2012, 08:40 |
for the same question
|
#13 | |
New Member
david
Join Date: Sep 2012
Posts: 1
Rep Power: 0 |
Quote:
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 |
||
|
|
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 |