Changing now boundaries
This commit is contained in:
parent
58e2fa7566
commit
c78d92fa7d
3 changed files with 170 additions and 128 deletions
|
|
@ -74,13 +74,6 @@ MODULE moduleMesh
|
|||
|
||||
END TYPE meshNodePointer
|
||||
|
||||
!Type for array of boundary functions (one per species)
|
||||
TYPE, PUBLIC:: fBoundaryGeneric
|
||||
PROCEDURE(boundary_interface), POINTER, NOPASS:: apply => NULL()
|
||||
CONTAINS
|
||||
|
||||
END TYPE
|
||||
|
||||
!Parent of Edge element
|
||||
TYPE, PUBLIC, ABSTRACT, EXTENDS(meshElement):: meshEdge
|
||||
!Nomber of nodes in the edge
|
||||
|
|
@ -94,9 +87,7 @@ MODULE moduleMesh
|
|||
! Surface of edge
|
||||
REAL(8):: surface = 0.D0
|
||||
!Pointer to boundary type
|
||||
TYPE(boundaryCont), POINTER:: boundary
|
||||
!Array of functions for boundary conditions
|
||||
TYPE(fBoundaryGeneric), ALLOCATABLE:: fBoundary(:)
|
||||
TYPE(boundaryCont), POINTER:: boundaries(:)
|
||||
!Physical surface for the edge
|
||||
INTEGER:: physicalSurface
|
||||
CONTAINS
|
||||
|
|
@ -165,18 +156,6 @@ MODULE moduleMesh
|
|||
|
||||
END INTERFACE
|
||||
|
||||
INTERFACE
|
||||
SUBROUTINE boundary_interface(edge, part)
|
||||
USE moduleSpecies
|
||||
|
||||
IMPORT:: meshEdge
|
||||
CLASS (meshEdge), INTENT(inout):: edge
|
||||
CLASS (particle), INTENT(inout):: part
|
||||
|
||||
END SUBROUTINE
|
||||
|
||||
END INTERFACE
|
||||
|
||||
!Containers for edges in the mesh
|
||||
TYPE:: meshEdgeCont
|
||||
CLASS(meshEdge), ALLOCATABLE:: obj
|
||||
|
|
@ -607,32 +586,67 @@ MODULE moduleMesh
|
|||
|
||||
! Boundary Particle Definitions
|
||||
!Generic type for boundaries
|
||||
TYPE, PUBLIC:: boundaryGeneric
|
||||
CONTAINS
|
||||
TYPE, abstract, PUBLIC:: boundaryGeneric
|
||||
integer:: n = 0
|
||||
character(:), allocatable:: name
|
||||
integer:: physicalSurface = 0 !Physical surface as defined in the mesh file
|
||||
contains
|
||||
procedure, pass:: initBoundary
|
||||
procedure(boundary_interface), deferred, pass:: apply
|
||||
|
||||
END TYPE boundaryGeneric
|
||||
|
||||
interface
|
||||
module subroutine initBoundary(self, config, object, i)
|
||||
use json_module
|
||||
|
||||
class(boundaryGeneric), intent(out):: self
|
||||
type(json_file), intent(inout):: config
|
||||
character(:), allocatable, intent(in):: object
|
||||
integer, intent(in):: i
|
||||
|
||||
end subroutine initBoundary
|
||||
|
||||
end interface
|
||||
|
||||
abstract interface
|
||||
subroutine boundary_interface(self, edge, part)
|
||||
use moduleSpecies
|
||||
import boundaryGeneric, meshEdge
|
||||
|
||||
class(boundaryGeneric), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine
|
||||
|
||||
end interface
|
||||
|
||||
!Reflecting boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryReflection
|
||||
CONTAINS
|
||||
procedure, pass:: apply => reflection
|
||||
|
||||
END TYPE boundaryReflection
|
||||
|
||||
!Absorption boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAbsorption
|
||||
CONTAINS
|
||||
procedure, pass:: apply => absorption
|
||||
|
||||
END TYPE boundaryAbsorption
|
||||
|
||||
!Transparent boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryTransparent
|
||||
CONTAINS
|
||||
procedure, pass:: apply => transparent
|
||||
|
||||
END TYPE boundaryTransparent
|
||||
|
||||
!Symmetry axis
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAxis
|
||||
CONTAINS
|
||||
procedure, pass:: apply => axis
|
||||
|
||||
END TYPE boundaryAxis
|
||||
|
||||
|
|
@ -641,6 +655,7 @@ MODULE moduleMesh
|
|||
!Thermal velocity of the wall: square root(Wall temperature X specific heat)
|
||||
REAL(8):: vTh
|
||||
CONTAINS
|
||||
procedure, pass:: apply => wallTemperature
|
||||
|
||||
END TYPE boundaryWallTemperature
|
||||
|
||||
|
|
@ -654,6 +669,7 @@ MODULE moduleMesh
|
|||
REAL(8):: eThreshold
|
||||
REAL(8):: deltaV
|
||||
CONTAINS
|
||||
procedure, pass:: apply => ionization
|
||||
|
||||
END TYPE boundaryIonization
|
||||
|
||||
|
|
@ -661,8 +677,11 @@ MODULE moduleMesh
|
|||
type, public, extends(boundaryGeneric):: boundaryQuasiNeutrality
|
||||
real(8):: alpha ! Reflection parameter
|
||||
integer, allocatable:: edges(:) !Array with edges
|
||||
contains
|
||||
procedure, pass:: apply => quasiNeutrality
|
||||
|
||||
end type boundaryQuasiNeutrality
|
||||
|
||||
!Wrapper for boundary types (one per species)
|
||||
TYPE:: bTypesCont
|
||||
CLASS(boundaryGeneric), ALLOCATABLE:: obj
|
||||
|
|
@ -670,16 +689,6 @@ MODULE moduleMesh
|
|||
|
||||
END TYPE bTypesCont
|
||||
|
||||
!Wrapper for boundary conditions
|
||||
TYPE:: boundaryCont
|
||||
INTEGER:: n = 0
|
||||
CHARACTER(:), ALLOCATABLE:: name
|
||||
INTEGER:: physicalSurface = 0 !Physical surface as defined in the mesh file
|
||||
CLASS(bTypesCont), ALLOCATABLE:: bTypes(:) !Array for boundary per species
|
||||
CONTAINS
|
||||
|
||||
END TYPE boundaryCont
|
||||
|
||||
interface
|
||||
module subroutine pointBoundaryFunction(edge, s)
|
||||
class(meshEdge), intent(inout):: edge
|
||||
|
|
@ -692,16 +701,35 @@ MODULE moduleMesh
|
|||
|
||||
end function getBoundaryId
|
||||
|
||||
module subroutine reflection(edge, part)
|
||||
use moduleSpecies
|
||||
module subroutine reflection(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryReflection), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine reflection
|
||||
end subroutine reflection
|
||||
|
||||
module subroutine absorption(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryAbsorption), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine absorption
|
||||
|
||||
end interface
|
||||
|
||||
TYPE:: boundaryCont
|
||||
INTEGER:: n = 0
|
||||
CHARACTER(:), ALLOCATABLE:: name
|
||||
INTEGER:: physicalSurface = 0 !Physical surface as defined in the mesh file
|
||||
CLASS(bTypesCont), ALLOCATABLE:: bTypes(:) !Array for boundary per species
|
||||
CONTAINS
|
||||
|
||||
END TYPE boundaryCont
|
||||
|
||||
!Number of boundaries
|
||||
INTEGER:: nBoundary = 0
|
||||
!Array for boundaries
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue