CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   writing SUBROUTINE (https://www.cfd-online.com/Forums/siemens/56527-writing-subroutine.html)

Elyor March 19, 2008 00:00

writing SUBROUTINE
 
hi guys, i am new on writing user subroutine, it will be really helpful if some1 give me some tips, or any manual about how to write subroutine. I am using star-cd 3.26 and Absoft90 fortran. also would be great if some1 share some examples of user subroutines, such as cavpro,conduc,specht and vismol. thanks a lot an advance for your help!


user March 20, 2008 06:35

Re: writing SUBROUTINE
 
user coding are the intellectual propriety of the user. we can share examples. A user is supposed to know the model he wants to implement.

elyor March 20, 2008 08:41

Re: writing SUBROUTINE in the Pump
 
thanks user!, I am calculating LPG vane pump cavitation. I am using butane-l for analyzing flow in the Pump. pipe D=6mm and L=120mm, pump rotar Diameter is 25mm and with 6 vanes. I used pressure boudary for inlet and outlet, saturation pressure is specified for inlet at the constant temperature, "inlet pressure + 5 bar" is specified for outlet. my questions are:

1)there is no butane-l in star-cd database, so do i need to write user subroutine for calculating CAV or it is enough just adding new material without any user subroutine.

2)in the inlet region of pipe, fluid is cavitating for about 20mm lengths of pipe then no CAV untill pump. what cause maybe?

thanks for your help!

Anton Lyaskin March 20, 2008 14:54

Re: writing SUBROUTINE in the Pump
 
1) You just need to specify all the properties, including saturated vapor pressure and etc. No user subroutine is needed, unless you want to specify some complex thermodynamics

2) Most probably this it because you've specified CAV concentration at inlet equal to 1, while it should be 0. Check scalar boundary conditions.

elyor March 24, 2008 19:57

Re: writing SUBROUTINE in the Pump
 
Thank you very much Anton I found the cause for why fluid was cavitating in the inlet side, as you siad the problem was in the scalar boundary, VOF concentration was 0 by default, i changed it to 1, now liquid is not cavitating in the inlet region.

My task is to optimize the LPG vane pump for suppressing cavitation. As I know there are possible two ways to identify the regions where cavitation can occur. One of them is to calculate the Net Positive Suction Head (NPSH), another one is to calculate the CAV using cavitation model.

My questions are:

1) how to determine exact NPSHr for new pump by using star-cd or by experimental data?

2) When I turn the cavitation option on, the Molecular Properties panel moved to "Cavitation folder" from "Liquids and Gases folder" in the STAR GUIde. Light Fluid is passive, and I specified butane (liquid) for heavy fluid. When I open the "Liquids and Gases folder" and select the "turbulence models panel" material# slider changes to 2 automatically. And it is shown that Turbulence Model is applied to butane (liquid), but material number is 1 in my model. If I set the material# slider to 1 there is Light Fluid which was passive. Do I have to change fluid material number from 1 to 2 of my model? if not, please advise which is the right way?

3) how many cycles I have to run the simulation (one complete rotation, two rotations, etc.) in order to get accurate results in terms of flow stability.

4) I am not interested in physics of cavitation (inception, bubble growth dynamics, etc.), I just have to determine local regions where cavitation occurs using STAR-CD, and then, I have to propose optimum pump design which would prevent or minimize cavitation. So, the question is that if it is possible to optimize the pump for cavitation, without using any cavitation models incorporated into STAR-CD.

thanks,


All times are GMT -4. The time now is 06:22.