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
|
|
@ -47,6 +47,15 @@ MODULE moduleMesh1DRad
|
|||
|
||||
END SUBROUTINE absorption
|
||||
|
||||
MODULE SUBROUTINE transparent(edge, part)
|
||||
USE moduleSpecies
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshEdge), INTENT(inout):: edge
|
||||
CLASS(particle), INTENT(inout):: part
|
||||
|
||||
END SUBROUTINE transparent
|
||||
|
||||
END INTERFACE
|
||||
|
||||
TYPE, PUBLIC, ABSTRACT, EXTENDS(meshVol):: meshVol1DRad
|
||||
|
|
@ -106,7 +115,6 @@ MODULE moduleMesh1DRad
|
|||
PROCEDURE, PASS:: getNodes => getNodesRad
|
||||
PROCEDURE, PASS:: phy2log => phy2logRad
|
||||
PROCEDURE, PASS:: nextElement => nextElementRad
|
||||
PROCEDURE, PASS:: resetOutput => resetOutputRad
|
||||
|
||||
END TYPE meshVol1DRadSegm
|
||||
|
||||
|
|
@ -179,6 +187,9 @@ MODULE moduleMesh1DRad
|
|||
TYPE IS(boundaryReflection)
|
||||
self%fBoundary(s)%apply => reflection
|
||||
|
||||
TYPE IS(boundaryTransparent)
|
||||
self%fBoundary(s)%apply => transparent
|
||||
|
||||
CLASS DEFAULT
|
||||
CALL criticalError("Boundary type not defined in this geometry", 'initEdge1DRad')
|
||||
|
||||
|
|
@ -467,29 +478,6 @@ MODULE moduleMesh1DRad
|
|||
|
||||
END SUBROUTINE nextElementRad
|
||||
|
||||
!Reset the output of nodes in element
|
||||
PURE SUBROUTINE resetOutputRad(self)
|
||||
USE moduleSpecies
|
||||
USE moduleOutput
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshVol1DRadSegm), INTENT(inout):: self
|
||||
INTEGER:: k
|
||||
|
||||
DO k = 1, nSpecies
|
||||
self%n1%output(k)%den = 0.D0
|
||||
self%n1%output(k)%mom = 0.D0
|
||||
self%n1%output(k)%tensorS = 0.D0
|
||||
|
||||
self%n2%output(k)%den = 0.D0
|
||||
self%n2%output(k)%mom = 0.D0
|
||||
self%n2%output(k)%tensorS = 0.D0
|
||||
|
||||
END DO
|
||||
|
||||
END SUBROUTINE resetOutputRad
|
||||
|
||||
|
||||
!COMMON FUNCTIONS FOR 1D VOLUME ELEMENTS
|
||||
!Computes the element Jacobian determinant
|
||||
PURE FUNCTION detJ1DRad(self, xi, dPsi_in) RESULT(dJ)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ SUBMODULE (moduleMesh1DRad) moduleMesh1DRadBoundary
|
|||
|
||||
END SELECT
|
||||
|
||||
part%n_in = .TRUE.
|
||||
|
||||
END SUBROUTINE reflection
|
||||
|
||||
SUBROUTINE absorption(edge, part)
|
||||
|
|
@ -24,9 +26,43 @@ SUBMODULE (moduleMesh1DRad) moduleMesh1DRadBoundary
|
|||
|
||||
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(meshEdge1DRad)
|
||||
rEdge(1) = edge%r
|
||||
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 moduleMesh1DRadBoundary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue