valve simulation

brivaelbrivael Member Posts: 34

Hello everyone, I am currently working on the development of a valve and I'm having difficulty getting good results. 

The valve has to open at 170 bars (pressure inlet) and at the outlet, it has to open at 1 bar (atmospheric pressure). The valve is associated with a spring to allow return. 

The surrounding fluid is compressible;

The analysis is transient 

Solver type: density-based

Formulation: implicit

The contact between the valve and the wall (upper wall) is defined as a porous area: 

mesh quality :


The calculation is launched at the first order of upwind. With a time step of 5 e-7s. 

The residues do not converge : 

And the valve moves with difficulty :

If someone has an idea how to solve this, I will be able to add information if you wish. 


Thank you  

Comments

  • KremellaKremella Admin Posts: 2,326

    Hi,

    Why are you using density-based solver? What flow Mach numbers do you expect?

    Also, do you have any dynamic mesh adaption specified in your model?

    What is the quality of your mesh? Max Skewness or Min orthogonal quality?

    Karthik

  • brivaelbrivael Member Posts: 34

    Hi @Kremella , thank you for your answer.

    -I chose a density based solver because it's a compressible fluid with density change;

    What do you mean by the Mach number of flow (I'm still an apprentice in fluid mechanics I don't master all the notions yet) -

    -Yes I created a dynamic mesh in the model

    -the quality of my mesh :

    The max skewness is 0.84

    The min orthogonality : 0.15

  • YasserSelimaYasserSelima Member Posts: 430

    Mach number is the velocity/sound velocity

    Density based solver will not be stable at low velocities .. if the Mach number is less than 0.3, use the pressure based solver. You can account for the gas compressibility by assuming ideal gas, or even use one of the real gas models available.

  • brivaelbrivael Member Posts: 34

    Hi @YasserSelima, thank you for your response. 

    on inlet of my system I have only one pressure ( 170 bars) and at the output 1 bar ( big pressure variation), so I won't be able to calculate the Mach number directly. So if M= v/c then to keep the solver based on the pressure it would be necessary that M<0.3 knowing that the speed of sound in the fluid (here the C02) is 260m/s (according to google) it would mean that v < 78 m/s, and that I don't know it in the input of games. 

  • YasserSelimaYasserSelima Member Posts: 430

    @brivael , The idea is that the pressure solver is more stable and can still handle high subsonic velocities accurately.

    On the other hand, the density based solver becomes unstable at low velocities and the solution accuracy is doubtful. This because of dealing with lots of small terms that approach 0.

  • KremellaKremella Admin Posts: 2,326

    Hi,

    The initial starting mesh definitely looks good. Since you are running a dynamic mesh simulation, have you tried just running the mesh preview to understand if you are on the right track? This would tell you if your mesh quality is deteriorating or not.

    Regarding pressure-based or density-based: Unless you expect a shock wave in your computational domain, my advice would be to stick with the pressure-based solvers. Because of their origins, density-based solvers are generally more accurate for capturing shock waves.

    Karthik

  • brivaelbrivael Member Posts: 34

    @YasserSelima, thanks for your answer, so I changed the solver, I chose the one based on pressure, indeed it seems to be more stable but the convergence still seems quite far: 


    Residuals: 

    But it still can't move my valve which is supposed to open at 160 bar (according to laboratory tests), yet I put a total pressure of 170 bar in the inlet. 


    The graph below shows the displacement of my 6dox (valve) which has a tendency to rise, which contradicts the laboratory tests: 

    One explanation I think for this is that the force caused by the fluid on the valve is very low so the spring raises the valve: 


    Any contribution would be highly appreciated 

    :)

  • brivaelbrivael Member Posts: 34

    hi @Kremella,

    I don't understand what you mean by running the mesh preview, could you please give me more precision?! 


    Concerning the solver thank you for your answer it's clear to me, so I changed it and got the results above. The problem encountered is mentioned above,

    thank you very much for your reactivity

  • YasserSelimaYasserSelima Member Posts: 430

    It seems to me that the selected time step is large. I have experience obtaining unstable Random values of the force which went back in range after decreasing the time step.

  • brivaelbrivael Member Posts: 34

    @YasserSelima,Are you suggesting that I reduce my time step? Currently it is at 5e-7, is there a principle that allows to directly find the optimal time step for a smooth transient simulation?

  • RobRob UKForum Coordinator Posts: 8,371

    If the valve isn't moving when you think it should can you check the 6DOF calculation to make sure you've got the force balance defined correctly?

  • brivaelbrivael Member Posts: 34

    @Rob, Thank you for your answer,

    according to the graphs I put above, the valve is moving, but very weakly. What do you mean by checking the 6DOF calculation? 

  • RobRob UKForum Coordinator Posts: 8,371

    You have some means of moving the geometry, check these are set correctly.

  • brivaelbrivael Member Posts: 34

    @Rob  By geometry you mean valve? I first tried a calculation in incompressible and I assigned a speed of displacement to my 6dof, and this one moved, but I would like it to move more with the inlet pressure (like in the laboratory), I confess that I don't really understand what you mean.

    PS: I'm still a student learning fluid mechanics and simulation software :) 

  • RobRob UKForum Coordinator Posts: 8,371

    Yes, the valve part that's moving. You can set the gate to move with pressure, and be resisted by the spring etc but that needs coding into the motion controlling UDF.

    You may also want to review your course notes on what happens when material at 170 bar vents to atmosphere: choking and flashing are two terms I'd be looking up at the same time.

  • YasserSelimaYasserSelima Member Posts: 430

    5e-07 seems low enough. But you should confirm this by calculation.

    There are many macros that could be used in a UDF that can move the valve according to the fluid forces. DEFINE_SDOF_PROPERTIES and DEFINE_CG_MOTION are the two macros that can work for your case. Rob was asking you to check the 6DOF or SDOF motion assuming that you are using it.

    There are examples in the UDF manual on using both macros and there are many topics here in the forum on them. You can have a look at the manual and search the forum before you decide.

  • brivaelbrivael Member Posts: 34

    @YasserSelima, I chose this time step to avoid the negative cell error. 

    Thank you for this information, I will try to turn my attention to the UDFs.

Sign In or Register to comment.