Added the possibility to have different boundary conditions per species.

A boundary condition for each species must be indicated in the case
file.
This opens the door to use boundary conditions with different parameters
(for example, a wall temperature, coefficients for reflection or
 absorption...)

The examples included with the code have been updated accordently.
This commit is contained in:
Jorge Gonzalez 2020-12-17 18:21:27 +01:00
commit 2c3e25b40e
18 changed files with 19389 additions and 1174 deletions

View file

@ -1,40 +1,32 @@
MODULE moduleMesh1DCartBoundary
SUBMODULE (moduleMesh1DCart) moduleMesh1DCartBoundary
USE moduleMesh1DCart
TYPE, PUBLIC, EXTENDS(meshEdge1DCart):: meshEdge1DCartRef
CONTAINS
PROCEDURE, PASS:: fBoundary => reflection
END TYPE meshEdge1DCartRef
TYPE, PUBLIC, EXTENDS(meshEdge1DCart):: meshEdge1DCartAbs
CONTAINS
PROCEDURE, PASS:: fBoundary => absorption
END TYPE meshEdge1DCartAbs
CONTAINS
SUBROUTINE reflection(self, part)
SUBROUTINE reflection(edge, part)
USE moduleSpecies
IMPLICIT NONE
CLASS(meshEdge1DCartRef), INTENT(inout):: self
CLASS(meshEdge), INTENT(inout):: edge
CLASS(particle), INTENT(inout):: part
part%v(1) = -part%v(1)
part%r(1) = 2.D0*self%x - part%r(1)
SELECT TYPE(edge)
TYPE IS(meshEdge1DCart)
part%v(1) = -part%v(1)
part%r(1) = 2.D0*edge%x - part%r(1)
END SELECT
END SUBROUTINE reflection
SUBROUTINE absorption(self, part)
SUBROUTINE absorption(edge, part)
USE moduleSpecies
IMPLICIT NONE
CLASS(meshEdge1DCartAbs), INTENT(inout):: self
CLASS(meshEdge), INTENT(inout):: edge
CLASS(particle), INTENT(inout):: part
part%n_in = .FALSE.
END SUBROUTINE absorption
END MODULE moduleMesh1DCartBoundary
END SUBMODULE moduleMesh1DCartBoundary