Boundaries done. Now to change the input and edges
This commit is contained in:
parent
c78d92fa7d
commit
0ccf455986
5 changed files with 239 additions and 221 deletions
|
|
@ -86,8 +86,8 @@ MODULE moduleMesh
|
|||
REAL(8):: normal(1:3)
|
||||
! Surface of edge
|
||||
REAL(8):: surface = 0.D0
|
||||
!Pointer to boundary type
|
||||
TYPE(boundaryCont), POINTER:: boundaries(:)
|
||||
!Pointer to boundary per species
|
||||
TYPE(boundaryCont), POINTER:: boundariesParticle(:)
|
||||
!Physical surface for the edge
|
||||
INTEGER:: physicalSurface
|
||||
CONTAINS
|
||||
|
|
@ -587,36 +587,33 @@ MODULE moduleMesh
|
|||
! Boundary Particle Definitions
|
||||
!Generic type for boundaries
|
||||
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
|
||||
procedure, pass:: init => initBoundary
|
||||
procedure(boundary_interface), deferred, nopass:: apply
|
||||
|
||||
END TYPE boundaryGeneric
|
||||
|
||||
interface
|
||||
module subroutine initBoundary(self, config, object, i)
|
||||
module subroutine initBoundary(self, config, object)
|
||||
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)
|
||||
subroutine boundary_interface(edge, part, self)
|
||||
use moduleSpecies
|
||||
import boundaryGeneric, meshEdge
|
||||
|
||||
class(boundaryGeneric), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine
|
||||
|
||||
|
|
@ -625,28 +622,28 @@ MODULE moduleMesh
|
|||
!Reflecting boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryReflection
|
||||
CONTAINS
|
||||
procedure, pass:: apply => reflection
|
||||
procedure, nopass:: apply => reflection
|
||||
|
||||
END TYPE boundaryReflection
|
||||
|
||||
!Absorption boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAbsorption
|
||||
CONTAINS
|
||||
procedure, pass:: apply => absorption
|
||||
procedure, nopass:: apply => absorption
|
||||
|
||||
END TYPE boundaryAbsorption
|
||||
|
||||
!Transparent boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryTransparent
|
||||
CONTAINS
|
||||
procedure, pass:: apply => transparent
|
||||
procedure, nopass:: apply => transparent
|
||||
|
||||
END TYPE boundaryTransparent
|
||||
|
||||
!Symmetry axis
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAxis
|
||||
CONTAINS
|
||||
procedure, pass:: apply => axis
|
||||
procedure, nopass:: apply => axis
|
||||
|
||||
END TYPE boundaryAxis
|
||||
|
||||
|
|
@ -655,7 +652,7 @@ MODULE moduleMesh
|
|||
!Thermal velocity of the wall: square root(Wall temperature X specific heat)
|
||||
REAL(8):: vTh
|
||||
CONTAINS
|
||||
procedure, pass:: apply => wallTemperature
|
||||
procedure, nopass:: apply => wallTemperature
|
||||
|
||||
END TYPE boundaryWallTemperature
|
||||
|
||||
|
|
@ -669,7 +666,7 @@ MODULE moduleMesh
|
|||
REAL(8):: eThreshold
|
||||
REAL(8):: deltaV
|
||||
CONTAINS
|
||||
procedure, pass:: apply => ionization
|
||||
procedure, nopass:: apply => ionization
|
||||
|
||||
END TYPE boundaryIonization
|
||||
|
||||
|
|
@ -678,17 +675,11 @@ MODULE moduleMesh
|
|||
real(8):: alpha ! Reflection parameter
|
||||
integer, allocatable:: edges(:) !Array with edges
|
||||
contains
|
||||
procedure, pass:: apply => quasiNeutrality
|
||||
procedure, nopass:: apply => quasiNeutrality
|
||||
|
||||
end type boundaryQuasiNeutrality
|
||||
|
||||
!Wrapper for boundary types (one per species)
|
||||
TYPE:: bTypesCont
|
||||
CLASS(boundaryGeneric), ALLOCATABLE:: obj
|
||||
CONTAINS
|
||||
|
||||
END TYPE bTypesCont
|
||||
|
||||
interface
|
||||
module subroutine pointBoundaryFunction(edge, s)
|
||||
class(meshEdge), intent(inout):: edge
|
||||
|
|
@ -696,36 +687,73 @@ MODULE moduleMesh
|
|||
|
||||
end subroutine pointBoundaryFunction
|
||||
|
||||
module function getBoundaryId(physicalSurface) result(id)
|
||||
integer:: physicalSurface
|
||||
|
||||
end function getBoundaryId
|
||||
|
||||
module subroutine reflection(self, edge, part)
|
||||
module subroutine reflection(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryReflection), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine reflection
|
||||
|
||||
module subroutine absorption(self, edge, part)
|
||||
module subroutine absorption(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryAbsorption), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine absorption
|
||||
|
||||
module subroutine transparent(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine transparent
|
||||
|
||||
module subroutine axis(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine axis
|
||||
|
||||
module subroutine wallTemperature(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine wallTemperature
|
||||
|
||||
module subroutine ionization(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine ionization
|
||||
|
||||
module subroutine quasiNeutrality(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine quasiNeutrality
|
||||
|
||||
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
|
||||
CLASS(boundaryGeneric), ALLOCATABLE:: obj
|
||||
CONTAINS
|
||||
|
||||
END TYPE boundaryCont
|
||||
|
|
@ -733,6 +761,6 @@ MODULE moduleMesh
|
|||
!Number of boundaries
|
||||
INTEGER:: nBoundary = 0
|
||||
!Array for boundaries
|
||||
TYPE(boundaryCont), ALLOCATABLE, TARGET:: boundaries(:)
|
||||
TYPE(boundaryCont), ALLOCATABLE, TARGET:: boundariesParticle(:)
|
||||
|
||||
END MODULE moduleMesh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue