External pressure


Does dualsphysics support applying pressure from outside? I noticed that in the 04_ExternalForces case it seems to give velocity to fluid particles instead of pressure.

If it is possible to import pressure from the outside, where is the tutorial?


  • In the example 04_ExternalForces, an acceleration (constant or time-dependent) is imposed on a selected block of fluid(s).

    The momentum equation has a source term on the RHS which is force per unit mass, hence acceleration.

    I am not sure if you want to assign external pressure or pressure gradient.

    If it is the former, in weakly compressible SPH, the pressure typically is taken to be the relative pressure (look at the equation of state, it is calculated relative to the fluid density at rest). So, you can apply any external pressure directly on the fluid particles by modifying the equation of state (You need to add this pressure in source files, compile and create executables again).

    If it is the pressure gradient (dPdx), follow the 04_ExternalForces example. Keep in mind that, the acceleration (a)


    Hope this helps.

Sign In or Register to comment.