Skip to content

Commit

Permalink
implement suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
LasNikas committed Oct 7, 2024
1 parent a98e278 commit f1a1d48
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/src/systems/entropically_damped_sph.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Here, ``\tilde{p}_{ab}`` is the density-weighted pressure
\tilde{p}_{ab} = \frac{\rho_b p_a + \rho_a p_b}{\rho_a + \rho_b},
```

with the density ``\rho_a``, ``\rho_b`` and the pressure ``p_a``, ``p_b`` of particles ``a`` and ``b`` respectively. ``\bm{A}_a`` and ``\bm{A}_b`` are the convection tensors for particle ``a`` and ``b`` respectively and is given, e.g. for particle ``a``, as ``\bm{A}_a = \rho v_a\left(\tilde{v}_a-v_a\right)^T``.
with the density ``\rho_a``, ``\rho_b`` and the pressure ``p_a``, ``p_b`` of particles ``a`` and ``b`` respectively. ``\bm{A}_a`` and ``\bm{A}_b`` are the convection tensors for particle ``a`` and ``b`` respectively and are given, e.g. for particle ``a``, as ``\bm{A}_a = \rho v_a\left(\tilde{v}_a-v_a\right)^T``.

```@autodocs
Modules = [TrixiParticles]
Expand Down
8 changes: 3 additions & 5 deletions src/schemes/fluid/entropically_damped_sph/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,9 @@ function update_average_pressure!(system, ::TransportVelocityAdami, v_ode, u_ode
end
end

for particle in eachparticle(system)
if neighbor_counter[particle] > 0
pressure_average[particle] /= neighbor_counter[particle]
end
end
pressure_average ./= neighbor_counter

return system
end

function write_v0!(v0, system::EntropicallyDampedSPHSystem, ::SummationDensity)
Expand Down
7 changes: 2 additions & 5 deletions src/schemes/fluid/transport_velocity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ See [TVF](@ref transport_velocity_formulation) for more details of the method.
Thus, it is highly recommended to use [`ViscosityAdami`](@ref) as viscosity model,
since [`ArtificialViscosityMonaghan`](@ref) leads to bad results.
"""
struct TransportVelocityAdami{ELTYPE}
background_pressure::ELTYPE
function TransportVelocityAdami(background_pressure::Real)
new{typeof(background_pressure)}(background_pressure)
end
struct TransportVelocityAdami{T<:Real}
background_pressure::T
end

# Calculate `v_nvariables` appropriately
Expand Down

0 comments on commit f1a1d48

Please sign in to comment.