CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   flow driven problem - fortran (http://www.cfd-online.com/Forums/cfx/86685-flow-driven-problem-fortran.html)

Matjaz March 30, 2011 07:09

flow driven problem - fortran
 
Hello to all,
i'd like to simulate turbine starting bahaviour of a wind turbine using Ansys 13 CFX. I have already succed using new 6dof capability, but i would also like to make it old way using fortran routine.
And there is my problem. The routine appears to work, but i got some strange results runing simulation. When i was checking my formula based on polar moment of inertia, dt and torque on blades from previous timestep i noticed it gives me back values of delta_omega instead of omega. Therefore i had to introduce a new wariable for my omega, which adds the value of every delta_omega for all previous steps. I tried to write omega in a file, but then simulation only runs for the completion of the first time step and then the error appears, something like: floating point error: Overflow. It appears that routine has run for several times in the first time step, creating about 3000 ! entries into my file.
I have read the CFX documentation regarding user fortran, which says that the processor splits the model into several parts and calls the routine for every one of them, which could explain my problem. Does anyone know how to solve this? I also know that writing my omega to file probably isn't the best practice, some fortran expert could also suggest me some better one, please.
Thank you all!
Matjaz

joey2007 April 6, 2011 14:56

Sorry, did not fully understand what you are doing or intend to do. Nevertheless I suspect your issue can be solved by storing values to CFX MMS. Refer to chapter 17.6 CFX modeling guide. Also see for user_peek* and user_poke*.

Matjaz April 8, 2011 03:28

Hello, thank you for your reply, i did read about POKER and PEEKR subroutines, but i'm missing some simple example of just storing and reading out a single value calculated in fortran routine. Using fortran specific memory gives me too much entries, while subroutine is called for each divided part of a model in each iteration, so i would have to use MMS. But these examples in ansys documentation are just too large for me to understand them, i also have no programming experience. Does anybody have some simple step by step guidance on how to achieve storing and reading from MMS?
Thank you, Matjaz

Matjaz April 11, 2011 04:26

What would be the simplest way to accumulate a variable value calculated in fortran subroutine, so that in next time steps it is simply added to the calculation in fortran?
regards, Matjaz

joey2007 April 11, 2011 13:52

I also would have to read through the examples and write a routine. This would take some time for me, too. As it is just some kind of hobby for me to answer these questions, I can not help you further. I am sorry. Contact the ANSYS service. The sites where they have CFX development (guess Canada) should be able to answer quickly.


All times are GMT -4. The time now is 01:48.