Modification in boundary conditions:
- Now absorption scatte the particle properties into the edge nodes. - New boundary condition 'transparent' subsitute old absorption.
This commit is contained in:
parent
2c3e25b40e
commit
9e3a1a771b
15 changed files with 212 additions and 148 deletions
|
|
@ -24,9 +24,43 @@ SUBMODULE (moduleMesh1DCart) moduleMesh1DCartBoundary
|
|||
|
||||
CLASS(meshEdge), INTENT(inout):: edge
|
||||
CLASS(particle), INTENT(inout):: part
|
||||
REAL(8):: rEdge(1) !Position of particle in the edge
|
||||
REAL(8):: d !Distance from particle to edge
|
||||
|
||||
SELECT TYPE(edge)
|
||||
TYPE IS(meshEdge1DCart)
|
||||
rEdge(1) = edge%x
|
||||
d = DABS(part%r(1) - rEdge(1))
|
||||
|
||||
IF (d > 0.D0) THEN
|
||||
part%weight = part%weight / d
|
||||
part%r(1) = rEdge(1)
|
||||
|
||||
END IF
|
||||
|
||||
IF (ASSOCIATED(edge%e1)) THEN
|
||||
CALL edge%e1%scatter(part)
|
||||
|
||||
ELSE
|
||||
CALL edge%e2%scatter(part)
|
||||
|
||||
END IF
|
||||
|
||||
END SELECT
|
||||
|
||||
part%n_in = .FALSE.
|
||||
|
||||
END SUBROUTINE absorption
|
||||
|
||||
SUBROUTINE transparent(edge, part)
|
||||
USE moduleSpecies
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshEdge), INTENT(inout):: edge
|
||||
CLASS(particle), INTENT(inout):: part
|
||||
|
||||
part%n_in = .FALSE.
|
||||
|
||||
END SUBROUTINE transparent
|
||||
|
||||
END SUBMODULE moduleMesh1DCartBoundary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue