|
[Sponsors] |
November 15, 2011, 08:37 |
Do-loop in CFX Perl language
|
#1 |
New Member
Enrico Anderlini
Join Date: Oct 2011
Location: Southampton
Posts: 4
Rep Power: 14 |
Hi!
I have to finish a project for my university, which simulates the fall of a rigid body onto a calm free surface. I did the simulation with a deforming mesh and now I'm supposed to do it with a fixed mesh, moving flow approach (the fluids are water, incompressible and air compressible). In order to do this I would need the flow velocity to be dependent on the force on the body at each time step (it is a transient simulation). The force on the body can be obtained with a monitor as force_y()@Body. The problem is I need to update the velocity at each time step. I have read this can be done with a junction box routine and a code written in Fortran. The problem is I need to run the simulation on different platforms (windows and linux) and this would require different languages for the specification of the location of the fortran files and different compilers. Besides, as I am new to this approach it would require quite a lot of time as well. I was wondering if there was a way to write this code all in Perl and within the CFX file so as to avoid these problems. The code would look something like this (in fortran-style): do i=1:tot number of time steps Fi=force_y()@Body !I would need to call this et everytime step, where !i is the interested time step Vi+1=Vi+(g-Fi/M)Dt !where Vi is the old velocity, M is the mass of !the body Dt is the time step yvel=Vi+1 !This is the function to be used in CFX Pre for the vertical velocity of the fluid. end do As you can see this is rather complicated as it would require a user input call at the beginning of each time step. Thank you in advance! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 15:45 |
heat generation in CFX | Ema | CFX | 4 | August 7, 2009 05:39 |
Electronics Enclosure Analysis with CFX | Simulation Engineer | CFX | 1 | April 22, 2009 11:08 |
CFX 10's solutions differ from CFX 5.7's | Atit Koonsrisuk | CFX | 4 | July 26, 2006 11:59 |
FSI using CFX and ANSYS | Bi Chang | CFX | 2 | May 10, 2005 04:47 |