CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   CCL, FORTRAN and water hammer (http://www.cfd-online.com/Forums/cfx/76051-ccl-fortran-water-hammer.html)

pingub May 12, 2010 12:31

CCL, FORTRAN and water hammer
 
Hello!
I need to perform some transient simulations regarding the interaction between a turbomachine and a pipe in water-hammer conditions.
In such a simulation the boundary conditions of the turbomachine depend on time, but i cannot use CEL expressions to define them, because they are solutions of the hydraulic problem inside the pipe.

For some reasons i wouldn't insert the pipe in the cfx computation as a mesh, but i'd like to solve the hydraulic problem inside the pipe with the 2 differential equations of motion of the water in transient condition with a characteristic lines method (it's a numerical method used to solve a pair of differential equations).

In this way the boundary conditions of the pump (Head downstream and Discharge upstream) would be the solutions of the interaction between the water hammer problem and the machine behaviour.

Now my question is:
- Can I use CCL to implement the characteristic lines method? How can I do?
- I'm pretty sure that the answer to my first question will be negative, so:
- Can I use FORTRAN to implement the characteristic lines method? How can I do?

I've never used fortran with CFX, and i did'nt any advice on CFX12 documentation.

I hope someone could help me.
Thanks,
pingub

ghorrocks May 12, 2010 18:51

You can do this using a fortran routine connected to the boundary condition.

But I recommend you instead model the pipe with a coarse mesh and eliminate the need for the interface. I did lots of work on IC engine manifolds where it was tempting to do as you suggest, but by far the easiest (and most accurate) way forwards was just to model the manifolds as well and then there is no requirement to develop the boundary condition. It is much easier to do a slightly larger CFD simulation than develop a custom solver in a BC.

pingub May 13, 2010 16:21

CCL, FORTRAN and water hammer
 
Hey, thank for your answer!!

Quote:

It is much easier to do a slightly larger CFD simulation than develop a custom solver in a BC.
I know, but the problem is that the lenght of my pipe is 200 meters. How coarse will be the mesh to let the simulation work on my workstation?

Quote:

You can do this using a fortran routine connected to the boundary condition.
I miss only :eek: learning FORTRAN and the connection between FORTRAN and CFX... :(
Unlikely i can only use MATLAB. But i think it could be the right time to learn FORTRAN!!!

Anyway, I will see...
Thank you again!!!

ghorrocks May 13, 2010 19:15

Quote:

the problem is that the lenght of my pipe is 200 meters. How coarse will be the mesh to let the simulation work on my workstation?
You will have to work that out, but you may well be able to mesh this with a coarse mesh which captures the hammer effects but does not add too much to the simulation size. If you make the walls slip walls that means you don't need to worry about boundary layer prisms, and if you make it an extruded mesh you can make the elements quite long in the pipe length dimension. You would only need to put 2 or 3 elements across the width of the flow to keep the element count down. Don't use the default tet mesh technique - you will need an extruded mesh so you keep the element count down.

Don't bother with fortran until you have shown this technique is not appropriate. I have used it many times so I can assure you it works.


All times are GMT -4. The time now is 18:59.