Rename of procedures in boundaries

This commit is contained in:
Jorge Gonzalez 2026-03-14 20:28:03 +01:00
commit 818f9fe37b
3 changed files with 61 additions and 55 deletions

View file

@ -864,7 +864,7 @@ MODULE moduleInput
CALL config%get(object // '.specificHeat', cw, found) CALL config%get(object // '.specificHeat', cw, found)
IF (.NOT. found) CALL criticalError("specificHeat not found for wallTemperature boundary type", 'readBoundary') IF (.NOT. found) CALL criticalError("specificHeat not found for wallTemperature boundary type", 'readBoundary')
CALL initWallTemperature(bound, Tw, cw) CALL wallTemperature_init(bound, Tw, cw)
CASE('ionization') CASE('ionization')
!Neutral parameters !Neutral parameters
@ -882,10 +882,10 @@ MODULE moduleInput
CALL config%get(object // '.electronSecondary', electronSecondary, found) CALL config%get(object // '.electronSecondary', electronSecondary, found)
IF (found) THEN IF (found) THEN
electronSecondaryID = speciesName2Index(electronSecondary) electronSecondaryID = speciesName2Index(electronSecondary)
CALL initIonization(bound, me/m_ref, m0, n0, v0, T0, & CALL ionization_init(bound, me/m_ref, m0, n0, v0, T0, &
speciesID, effTime, crossSection, eThreshold, electronSecondaryID) speciesID, effTime, crossSection, eThreshold, electronSecondaryID)
ELSE ELSE
CALL initIonization(bound, me/m_ref, m0, n0, v0, T0, & CALL ionization_init(bound, me/m_ref, m0, n0, v0, T0, &
speciesID, effTime, crossSection, eThreshold) speciesID, effTime, crossSection, eThreshold)
END IF END IF

View file

@ -664,13 +664,15 @@ MODULE moduleMesh
end type boundaryParticleGeneric end type boundaryParticleGeneric
interface interface
module subroutine initWallTemperature(boundary, T, c) ! Init interfaces
! wallTemeprature
module subroutine wallTemperature_init(boundary, T, c)
CLASS(boundaryParticleGeneric), ALLOCATABLE, INTENT(inout):: boundary CLASS(boundaryParticleGeneric), ALLOCATABLE, INTENT(inout):: boundary
REAL(8), INTENT(in):: T, c !Wall temperature and specific heat REAL(8), INTENT(in):: T, c !Wall temperature and specific heat
end subroutine initWallTemperature end subroutine wallTemperature_init
module subroutine initIonization(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary) module subroutine ionization_init(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary)
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
real(8), intent(in):: mImpact real(8), intent(in):: mImpact
real(8), intent(in):: m0, n0, v0(1:3), T0 !Neutral properties real(8), intent(in):: m0, n0, v0(1:3), T0 !Neutral properties
@ -680,20 +682,23 @@ MODULE moduleMesh
real(8), intent(in):: eThreshold real(8), intent(in):: eThreshold
integer, optional, intent(in):: electronSecondary integer, optional, intent(in):: electronSecondary
end subroutine initIonization end subroutine ionization_init
! quasiNeutrality
module subroutine quasiNeutrality_init(boundary, s_incident) module subroutine quasiNeutrality_init(boundary, s_incident)
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
integer, intent(in):: s_incident integer, intent(in):: s_incident
end subroutine quasiNeutrality_init end subroutine quasiNeutrality_init
! outflowAdaptive
module subroutine outflowAdaptive_init(boundary, s_incident) module subroutine outflowAdaptive_init(boundary, s_incident)
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
integer, intent(in):: s_incident integer, intent(in):: s_incident
end subroutine outflowAdaptive_init end subroutine outflowAdaptive_init
! Get the index of the species from its name
module function boundaryParticleName_to_Index(boundaryName) result(bp) module function boundaryParticleName_to_Index(boundaryName) result(bp)
character(:), allocatable:: boundaryName character(:), allocatable:: boundaryName
integer:: bp integer:: bp
@ -703,6 +708,7 @@ MODULE moduleMesh
end interface end interface
abstract interface abstract interface
! Apply the effects of the boundary to the particle
subroutine applyParticle_interface(self, edge, part) subroutine applyParticle_interface(self, edge, part)
use moduleSpecies use moduleSpecies
import boundaryParticleGeneric, meshEdge import boundaryParticleGeneric, meshEdge
@ -721,7 +727,7 @@ MODULE moduleMesh
end subroutine updateParticle_interface end subroutine updateParticle_interface
! Update the values of the particle boundary model ! Write the values of the particle boundary model
subroutine printParticle_interface(self, fileID) subroutine printParticle_interface(self, fileID)
import boundaryParticleGeneric import boundaryParticleGeneric
@ -735,28 +741,28 @@ MODULE moduleMesh
!Reflecting boundary !Reflecting boundary
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryReflection TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryReflection
CONTAINS CONTAINS
procedure, pass:: apply => reflection procedure, pass:: apply => reflection_apply
END TYPE boundaryReflection END TYPE boundaryReflection
!Absorption boundary !Absorption boundary
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAbsorption TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAbsorption
CONTAINS CONTAINS
procedure, pass:: apply => absorption procedure, pass:: apply => absorption_apply
END TYPE boundaryAbsorption END TYPE boundaryAbsorption
!Transparent boundary !Transparent boundary
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryTransparent TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryTransparent
CONTAINS CONTAINS
procedure, pass:: apply => transparent procedure, pass:: apply => transparent_apply
END TYPE boundaryTransparent END TYPE boundaryTransparent
!Symmetry axis !Symmetry axis
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAxis TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAxis
CONTAINS CONTAINS
procedure, pass:: apply => symmetryAxis procedure, pass:: apply => symmetryAxis_apply
END TYPE boundaryAxis END TYPE boundaryAxis
@ -765,7 +771,7 @@ MODULE moduleMesh
!Thermal velocity of the wall: square root(Wall temperature X specific heat) !Thermal velocity of the wall: square root(Wall temperature X specific heat)
REAL(8):: vTh REAL(8):: vTh
CONTAINS CONTAINS
procedure, pass:: apply => wallTemperature procedure, pass:: apply => wallTemperature_apply
END TYPE boundaryWallTemperature END TYPE boundaryWallTemperature
@ -781,7 +787,7 @@ MODULE moduleMesh
integer:: tally integer:: tally
integer(KIND=OMP_LOCK_KIND):: tally_lock integer(KIND=OMP_LOCK_KIND):: tally_lock
CONTAINS CONTAINS
procedure, pass:: apply => ionization procedure, pass:: apply => ionization_apply
END TYPE boundaryIonization END TYPE boundaryIonization
@ -791,7 +797,7 @@ MODULE moduleMesh
integer:: s_incident ! species index of the incident species integer:: s_incident ! species index of the incident species
type(meshEdgePointer), allocatable:: edges(:) !Array with edges type(meshEdgePointer), allocatable:: edges(:) !Array with edges
contains contains
procedure, pass:: apply => quasiNeutrality procedure, pass:: apply => quasiNeutrality_apply
end type boundaryQuasiNeutrality end type boundaryQuasiNeutrality
@ -801,82 +807,82 @@ MODULE moduleMesh
integer:: s_incident ! species index of the incident species integer:: s_incident ! species index of the incident species
type(meshEdgePointer), allocatable:: edges(:) !Array with edges type(meshEdgePointer), allocatable:: edges(:) !Array with edges
contains contains
procedure, pass:: apply => outflowAdaptive procedure, pass:: apply => outflowAdaptive_apply
end type boundaryOutflowAdaptive end type boundaryOutflowAdaptive
interface interface
module subroutine reflection(self, edge, part) module subroutine reflection_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryReflection), intent(inout):: self class(boundaryReflection), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine reflection end subroutine reflection_apply
module subroutine absorption(self, edge, part) module subroutine absorption_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryAbsorption), intent(inout):: self class(boundaryAbsorption), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine absorption end subroutine absorption_apply
module subroutine transparent(self, edge, part) module subroutine transparent_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryTransparent), intent(inout):: self class(boundaryTransparent), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine transparent end subroutine transparent_apply
module subroutine symmetryAxis(self, edge, part) module subroutine symmetryAxis_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryAxis), intent(inout):: self class(boundaryAxis), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine symmetryAxis end subroutine symmetryAxis_apply
module subroutine wallTemperature(self, edge, part) module subroutine wallTemperature_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryWallTemperature), intent(inout):: self class(boundaryWallTemperature), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine wallTemperature end subroutine wallTemperature_apply
module subroutine ionization(self, edge, part) module subroutine ionization_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryIonization), intent(inout):: self class(boundaryIonization), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine ionization end subroutine ionization_apply
module subroutine quasiNeutrality(self, edge, part) module subroutine quasiNeutrality_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryQuasiNeutrality), intent(inout):: self class(boundaryQuasiNeutrality), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine quasiNeutrality end subroutine quasiNeutrality_apply
module subroutine outflowAdaptive(self, edge, part) module subroutine outflowAdaptive_apply(self, edge, part)
use moduleSpecies use moduleSpecies
class(boundaryOutflowAdaptive), intent(inout):: self class(boundaryOutflowAdaptive), intent(inout):: self
class(meshEdge), intent(inout):: edge class(meshEdge), intent(inout):: edge
class(particle), intent(inout):: part class(particle), intent(inout):: part
end subroutine outflowAdaptive end subroutine outflowAdaptive_apply
! Generic basic boundary conditions to use internally in the code ! Generic basic boundary conditions to use internally in the code
module subroutine genericReflection(edge, part) module subroutine genericReflection(edge, part)

View file

@ -26,7 +26,7 @@ submodule(moduleMesh) boundaryParticle
end function boundaryParticleName_to_Index end function boundaryParticleName_to_Index
module SUBROUTINE reflection(self, edge, part) module SUBROUTINE reflection_apply(self, edge, part)
USE moduleCaseParam USE moduleCaseParam
USE moduleSpecies USE moduleSpecies
IMPLICIT NONE IMPLICIT NONE
@ -50,10 +50,10 @@ submodule(moduleMesh) boundaryParticle
!particle is assumed to be inside !particle is assumed to be inside
part%n_in = .TRUE. part%n_in = .TRUE.
END SUBROUTINE reflection END SUBROUTINE reflection_apply
!Absoption in a surface !Absoption in a surface
module SUBROUTINE absorption(self, edge, part) module SUBROUTINE absorption_apply(self, edge, part)
USE moduleCaseParam USE moduleCaseParam
USE moduleSpecies USE moduleSpecies
IMPLICIT NONE IMPLICIT NONE
@ -87,10 +87,10 @@ submodule(moduleMesh) boundaryParticle
END IF END IF
END SUBROUTINE absorption END SUBROUTINE absorption_apply
!Transparent boundary condition !Transparent boundary condition
module SUBROUTINE transparent(self, edge, part) module SUBROUTINE transparent_apply(self, edge, part)
USE moduleSpecies USE moduleSpecies
IMPLICIT NONE IMPLICIT NONE
@ -101,12 +101,12 @@ submodule(moduleMesh) boundaryParticle
!Removes particle from domain !Removes particle from domain
part%n_in = .FALSE. part%n_in = .FALSE.
END SUBROUTINE transparent END SUBROUTINE transparent_apply
!Symmetry axis. Reflects particles. !Symmetry axis. Reflects particles.
!Although this function should never be called, it is set as a reflective boundary !Although this function should never be called, it is set as a reflective boundary
!to properly deal with possible particles reaching a corner and selecting this boundary. !to properly deal with possible particles reaching a corner and selecting this boundary.
module SUBROUTINE symmetryAxis(self, edge, part) module SUBROUTINE symmetryAxis_apply(self, edge, part)
USE moduleSpecies USE moduleSpecies
IMPLICIT NONE IMPLICIT NONE
@ -116,12 +116,12 @@ submodule(moduleMesh) boundaryParticle
CALL genericReflection(edge, part) CALL genericReflection(edge, part)
END SUBROUTINE symmetryAxis END SUBROUTINE symmetryAxis_apply
! wallTemperature ! wallTemperature
! During the collision, the boundary transfers part of the energy to the incident particle ! During the collision, the boundary transfers part of the energy to the incident particle
! Init ! Init
module SUBROUTINE initWallTemperature(boundary, T, c) module SUBROUTINE wallTemperature_init(boundary, T, c)
USE moduleRefParam USE moduleRefParam
IMPLICIT NONE IMPLICIT NONE
@ -138,10 +138,10 @@ submodule(moduleMesh) boundaryParticle
end select end select
END SUBROUTINE initWallTemperature END SUBROUTINE wallTemperature_init
! Apply ! Apply
module SUBROUTINE wallTemperature(self, edge, part) module SUBROUTINE wallTemperature_apply(self, edge, part)
USE moduleSpecies USE moduleSpecies
USE moduleRandom USE moduleRandom
IMPLICIT NONE IMPLICIT NONE
@ -159,12 +159,12 @@ submodule(moduleMesh) boundaryParticle
CALL genericReflection(edge, part) CALL genericReflection(edge, part)
END SUBROUTINE wallTemperature END SUBROUTINE wallTemperature_apply
! ionization ! ionization
! An electron will pass through the surface and create a series of ion-electron pairs based on a neutral background ! An electron will pass through the surface and create a series of ion-electron pairs based on a neutral background
!init !init
module SUBROUTINE initIonization(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary) module SUBROUTINE ionization_init(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary)
use moduleRefParam use moduleRefParam
use moduleSpecies use moduleSpecies
use moduleCaseParam use moduleCaseParam
@ -212,7 +212,7 @@ submodule(moduleMesh) boundaryParticle
boundary%eThreshold = eThreshold*eV2J/(m_ref*v_ref**2) boundary%eThreshold = eThreshold*eV2J/(m_ref*v_ref**2)
boundary%deltaV = DSQRT(boundary%eThreshold/mImpact) boundary%deltaV = DSQRT(boundary%eThreshold/mImpact)
boundary%update => ionization_resetTally boundary%update => ionization_update
boundary%print => ionization_print boundary%print => ionization_print
boundary%tally = 0 boundary%tally = 0
@ -220,10 +220,10 @@ submodule(moduleMesh) boundaryParticle
END SELECT END SELECT
END SUBROUTINE initIonization END SUBROUTINE ionization_init
! Apply ! Apply
module SUBROUTINE ionization(self, edge, part) module SUBROUTINE ionization_apply(self, edge, part)
USE moduleList USE moduleList
USE moduleSpecies USE moduleSpecies
USE moduleMesh USE moduleMesh
@ -324,10 +324,10 @@ submodule(moduleMesh) boundaryParticle
!Removes ionizing electron regardless the number of pair created !Removes ionizing electron regardless the number of pair created
part%n_in = .FALSE. part%n_in = .FALSE.
END SUBROUTINE ionization END SUBROUTINE ionization_apply
! Update ! Update
subroutine ionization_resetTally(self) subroutine ionization_update(self)
implicit none implicit none
class(boundaryParticleGeneric), intent(inout):: self class(boundaryParticleGeneric), intent(inout):: self
@ -338,7 +338,7 @@ submodule(moduleMesh) boundaryParticle
end select end select
end subroutine ionization_resetTally end subroutine ionization_update
! Print ! Print
subroutine ionization_print(self, fileID) subroutine ionization_print(self, fileID)
@ -382,7 +382,7 @@ submodule(moduleMesh) boundaryParticle
end subroutine quasiNeutrality_init end subroutine quasiNeutrality_init
! Apply ! Apply
module subroutine quasiNeutrality(self, edge, part) module subroutine quasiNeutrality_apply(self, edge, part)
use moduleRandom use moduleRandom
implicit none implicit none
@ -398,7 +398,7 @@ submodule(moduleMesh) boundaryParticle
end if end if
end subroutine quasiNeutrality end subroutine quasiNeutrality_apply
! Update ! Update
subroutine quasiNeutrality_update(self) subroutine quasiNeutrality_update(self)
@ -513,7 +513,7 @@ submodule(moduleMesh) boundaryParticle
end subroutine outflowAdaptive_init end subroutine outflowAdaptive_init
! Apply ! Apply
module subroutine outflowAdaptive(self, edge, part) module subroutine outflowAdaptive_apply(self, edge, part)
use moduleSpecies use moduleSpecies
use moduleRefParam, only: v_ref use moduleRefParam, only: v_ref
implicit none implicit none
@ -532,7 +532,7 @@ submodule(moduleMesh) boundaryParticle
end if end if
end subroutine outflowAdaptive end subroutine outflowAdaptive_apply
! Update ! Update
subroutine outflowAdaptive_update(self) subroutine outflowAdaptive_update(self)