Skip to content

Replace gravity with body force #43

Description

@keiyamamo

gravity should be replaced with body force. Current implementation only allows us to apply force in y-direction

if gravity is not None and mesh.geometry().dim() == 2:
F_solid_linear -= inner(Constant((0, -gravity * rho_s)), psi)*dx_s[solid_region]
elif gravity is not None and mesh.geometry().dim() == 3:
F_solid_linear -= inner(Constant((0, -gravity * rho_s,0)), psi)*dx_s[solid_region]

Oasis can be used as a reference point for the body force.
https://github.com/mikaem/Oasis/blob/da712b87a8998d0669df0448b1a4bbd9fea284d6/oasis/NSfracStep.py#L158-L159

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions