Input pressure with an inlet

Hello,

It is indicated in 3.15 Open Boundary Conditions (here https://github.com/DualSPHysics/DualSPHysics/wiki/3.-SPH-formulation) that "Variable Velocity and Pressure Profiles: Unsteady velocity and pressure profiles and/or pressure and velocity gradients along a given direction can now be assigned in buffer areas."

I didn't find out how to do that while trying to impose a pressure or pressure gradient with an inlet.

In the XML_GUIDE_INLETOUTLET pdf document p.12, it is only explained that "The three variables over which a user has control are the velocity for which the tag imposevelocity is used, the density for which the tag imposerhop is used, and the water level for which the tag imposezsurf is used"

Should I use the density ? How ?

Thanks in advance.

Comments

  • Hi again,

    I have another question.

    In the example case of Poiseuille flow, a gravitational acceleration is used as an input force for the fluid and considered as a pressure gradient in the analytical solution. I don't understand why ... (being able to apply a pressure gradient with an inlet would be nice here)

  • Hi,

    Think of momentum equation as the acceleration equation, any force on the RHS of the equation will cause particles to accelerate. In this case, the driving force is a constant pressure gradient in the streamwise direction. So, you can define this driving force as gravity in streamwise direction since it is way easier to define.

    I haven't tried it yet but you could try to define pressure gradient instead of gravity by defining density at inlet and outlet buffers. Since you know the state equation you should be able relate density and pressure.

  • Thank you for your help !

    I won't be using gravity as a pressure gradient in my work because I need to place inlets and outlets on irregular models (blood vessels).

    Indeed, with the state equation, I have a density value I'd like to define so that a pressure is applied on inlet/outlet particles. However, even with the following parameter, we cannot specify a value for the density ...

    <imposerhop mode="0" comment="Outlet rhop 0:Imposed fixed value, 1:Hydrostatic, 2:Extrapolated from ghost nodes (default=0)" />

    I am firstly testing a basic 2D Poiseuille flow and the simulation works without any density value (with an imposed density for the inlet and extrapolated for the outlet), the speed distribution is quite good unlike the pressure distribution which is increasing instead of decreasing in x direction. Besides, all values are very low : 2e-6 < speed (m/s) < 3e-5 and 2e-4 < pressure (Pa) < 7e-3 ...

    Which values are considered for the density/driving force in this case ?

  • Hi,

    I am writing to see if anyone has a recommended way to implement this?

    As stated above, it seems the correct implementation for specifying density is to set "imposerhop" to mode 0, then to add a tag

    rhop value="density" (as will be accounted for by Monaghan, et al' state equation units_comment="kg/m3"


    When I tried defining it this way in the case XML, the dualsphysics command states an exception: "Text: Error reading xml - Element 'rhop' is invalid."

  • Where does the tag comes from?

    You only have to use:

     <imposerhop mode="0" comment="Outlet rhop 0:Imposed fixed value, 1:Hydrostatic, 2:Extrapolated from ghost nodes (default=0)" />


    Regards

  • Alex,

    Please see the below image from "SPH Formulation"


    I would like to specify the density value (rhop). The initial density value (rhop0) is set in the constantsdef tag.

    This is to impose a pressure on the inlet buffer as discussed by Florian and circles above. Considering a weakly compressible fluid, I am assuming that we may calculate the rhop value needed to simulate the inlet pressure.

Sign In or Register to comment.