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:
parent
dc98fe9399
commit
2c3e25b40e
18 changed files with 19389 additions and 1174 deletions
|
|
@ -15,7 +15,7 @@ MODULE moduleMesh1DCart
|
|||
|
||||
END TYPE meshNode1DCart
|
||||
|
||||
TYPE, PUBLIC, ABSTRACT, EXTENDS(meshEdge):: meshEdge1DCart
|
||||
TYPE, PUBLIC, EXTENDS(meshEdge):: meshEdge1DCart
|
||||
!Element coordinates
|
||||
REAL(8):: x = 0.D0
|
||||
!Connectivity to nodes
|
||||
|
|
@ -27,6 +27,28 @@ MODULE moduleMesh1DCart
|
|||
|
||||
END TYPE meshEdge1DCart
|
||||
|
||||
!Boundary functions defined in the submodule Boundary
|
||||
INTERFACE
|
||||
MODULE SUBROUTINE reflection(edge, part)
|
||||
USE moduleSpecies
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshEdge), INTENT(inout):: edge
|
||||
CLASS(particle), INTENT(inout):: part
|
||||
|
||||
END SUBROUTINE reflection
|
||||
|
||||
MODULE SUBROUTINE absorption(edge, part)
|
||||
USE moduleSpecies
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshEdge), INTENT(inout):: edge
|
||||
CLASS(particle), INTENT(inout):: part
|
||||
|
||||
END SUBROUTINE absorption
|
||||
|
||||
END INTERFACE
|
||||
|
||||
TYPE, PUBLIC, ABSTRACT, EXTENDS(meshVol):: meshVol1DCart
|
||||
CONTAINS
|
||||
PROCEDURE, PASS:: detJac => detJ1DCart
|
||||
|
|
@ -122,6 +144,9 @@ MODULE moduleMesh1DCart
|
|||
!EDGE FUNCTIONS
|
||||
!Inits edge element
|
||||
SUBROUTINE initEdge1DCart(self, n, p, bt, physicalSurface)
|
||||
USE moduleSpecies
|
||||
USE moduleBoundary
|
||||
USE moduleErrors
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(meshEdge1DCart), INTENT(out):: self
|
||||
|
|
@ -130,6 +155,7 @@ MODULE moduleMesh1DCart
|
|||
INTEGER, INTENT(in):: bt
|
||||
INTEGER, INTENT(in):: physicalSurface
|
||||
REAL(8), DIMENSION(1:3):: r1
|
||||
INTEGER:: s
|
||||
|
||||
self%n = n
|
||||
self%n1 => mesh%nodes(p(1))%obj
|
||||
|
|
@ -141,7 +167,24 @@ MODULE moduleMesh1DCart
|
|||
self%normal = (/ 1.D0, 0.D0, 0.D0 /)
|
||||
|
||||
!Boundary index
|
||||
self%bt = bt
|
||||
self%boundary => boundary(bt)
|
||||
ALLOCATE(self%fboundary(1:nSpecies))
|
||||
!Assign functions to boundary
|
||||
DO s = 1, nSpecies
|
||||
SELECT TYPE(obj => self%boundary%bTypes(s)%obj)
|
||||
TYPE IS(boundaryAbsorption)
|
||||
self%fBoundary(s)%apply => absorption
|
||||
|
||||
TYPE IS(boundaryReflection)
|
||||
self%fBoundary(s)%apply => reflection
|
||||
|
||||
CLASS DEFAULT
|
||||
CALL criticalError("Boundary type not defined in this geometry", 'initEdge1DCart')
|
||||
|
||||
END SELECT
|
||||
|
||||
END DO
|
||||
|
||||
!Physical Surface
|
||||
self%physicalSurface = physicalSurface
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue