Skip to content

Commit

Permalink
change parabolic BC
Browse files Browse the repository at this point in the history
  • Loading branch information
yolhan83 committed Jan 16, 2025
1 parent 3770a29 commit 06ebcf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions exemples/Model1DOrd2/exemple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ bc_hypo = (;
)

bc_parab = (;
x_neg = boundary_condition_pressure_in,
x_pos = Trixi.BoundaryConditionDoNothing()
x_neg = BoundaryConditionNeumann((x,t,eq) -> SVector(0.0,0,0,0,0)),
x_pos = BoundaryConditionNeumann((x,t,eq) -> SVector(0.0,0,0,0,0))
)

solver = DGSEM(polydeg = 2,
Expand Down
10 changes: 5 additions & 5 deletions src/1DModel/Ord2/1dmodelord2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Trixi.flux(u,gradients,orientation::Int,eq_parab ::BloodFlowEquations1D
dudx = gradients
a,Q,_,A0 = u
A = a+A0
val = 3*eq_parab.model1d.nu * (-(dudx[1] + dudx[4])*Q/A + dudx[2])
val = -3*eq_parab.model1d.nu * (-(dudx[1] + dudx[4])*Q/A + dudx[2])
return SVector(0.0,val,0,0)
end

Expand Down Expand Up @@ -35,31 +35,31 @@ end
# Dirichlet and Neumann boundary conditions for use with parabolic solvers in weak form.
# Note that these are general, so they apply to LaplaceDiffusion in any spatial dimension.
@inline function (boundary_condition::Trixi.BoundaryConditionDirichlet)(flux_inner, u_inner,
normal::AbstractVector,
orientation_or_normal,direction,
x, t,
operator_type::Trixi.Gradient,
equations_parabolic::BloodFlowEquations1DOrd2)
return boundary_condition.boundary_value_function(x, t, equations_parabolic)
end

@inline function (boundary_condition::Trixi.BoundaryConditionDirichlet)(flux_inner, u_inner,
normal::AbstractVector,
orientation_or_normal,direction,
x, t,
operator_type::Trixi.Divergence,
equations_parabolic::BloodFlowEquations1DOrd2)
return flux_inner
end

@inline function (boundary_condition::Trixi.BoundaryConditionNeumann)(flux_inner, u_inner,
normal::AbstractVector,
orientation_or_normal,direction,
x, t,
operator_type::Trixi.Divergence,
equations_parabolic::BloodFlowEquations1DOrd2)
return boundary_condition.boundary_normal_flux_function(x, t, equations_parabolic)
end

@inline function (boundary_condition::Trixi.BoundaryConditionNeumann)(flux_inner, u_inner,
normal::AbstractVector,
orientation_or_normal,direction,
x, t,
operator_type::Trixi.Gradient,
equations_parabolic::BloodFlowEquations1DOrd2)
Expand Down

0 comments on commit 06ebcf3

Please sign in to comment.