- **CFX**
(*https://www.cfd-online.com/Forums/cfx/*)

- - **CCL, FORTRAN and water hammer**
(*https://www.cfd-online.com/Forums/cfx/76051-ccl-fortran-water-hammer.html*)

CCL, FORTRAN and water hammerHello!
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 |

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. |

CCL, FORTRAN and water hammerHey, thank for your answer!!
Quote:
Quote:
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!!! |

Quote:
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 09:52. |