Preparing to change the input

This commit is contained in:
Jorge Gonzalez 2026-02-10 18:46:37 +01:00
commit defcf02466
3 changed files with 43 additions and 10 deletions

View file

@ -1,7 +1,31 @@
!moduleMeshBoundary: Boundary functions for the mesh edges
submodule(moduleMesh) boundary
contains
module subroutine initBoundary(self, config, object)
module function boundaryParticleName2Index(boundaryName) result(bp)
use moduleErrors
implicit none
character(:), allocatable:: boundaryName
integer:: bp
integer:: b
bp = 0
do b = 1, nBoundaries
if (boundaryName == boundariesParticle(b)%obj%name) then
bp = boundariesParticle(b)%obj%n
end if
end do
if (bp == 0) then
call criticalError('Boundary ' // boundaryName // ' not found', 'boundaryName2Index')
end if
end function boundaryParticleName2Index
module subroutine initBoundary(self, config, object, b)
use json_module
use moduleRefParam, only: m_ref
use moduleConstParam, only: me
@ -10,6 +34,7 @@ submodule(moduleMesh) boundary
class(boundaryGeneric), allocatable, intent(out):: self
type(json_file), intent(inout):: config
character(:), allocatable, intent(in):: object
integer, intent(in):: b
character(:), allocatable:: bType
logical:: found
real(8):: Tw, cw !Wall temperature and specific heat
@ -21,6 +46,7 @@ submodule(moduleMesh) boundary
integer:: speciesID, electronSecondaryID
character(:), allocatable:: speciesName, crossSection, electronSecondary
self%n = b
CALL config%get(object // '.name', self%name, found)
CALL config%get(object // '.type', bType, found)
SELECT CASE(bType)
@ -99,7 +125,13 @@ submodule(moduleMesh) boundary
REAL(8):: vTh
vTh = DSQRT(c * T) / v_ref
boundary = boundaryWallTemperature(vTh = vTh)
allocate(boundaryWallTemperature:: boundary)
select type(boundary)
type is(boundaryWallTemperature)
boundary%vTh = vTh
end select
END SUBROUTINE initWallTemperature