From 4747673d0a81af1ee55dad7bb197f595028d0625 Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Wed, 28 Jan 2026 14:56:38 +0100 Subject: [PATCH] Bones of boundary --- src/modules/mesh/moduleMeshBoundary.f90 | 28 ++++++++++++------------- src/modules/moduleBoundary.f90 | 15 +++++++++---- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/modules/mesh/moduleMeshBoundary.f90 b/src/modules/mesh/moduleMeshBoundary.f90 index 091e52e..655e4df 100644 --- a/src/modules/mesh/moduleMeshBoundary.f90 +++ b/src/modules/mesh/moduleMeshBoundary.f90 @@ -77,6 +77,20 @@ MODULE moduleMeshBoundary END SUBROUTINE transparent + !Symmetry axis. Reflects particles. + !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. + SUBROUTINE symmetryAxis(edge, part) + USE moduleSpecies + IMPLICIT NONE + + CLASS(meshEdge), INTENT(inout):: edge + CLASS(particle), INTENT(inout):: part + + CALL reflection(edge, part) + + END SUBROUTINE symmetryAxis + !Wall with temperature SUBROUTINE wallTemperature(edge, part) USE moduleSpecies @@ -204,20 +218,6 @@ MODULE moduleMeshBoundary END SUBROUTINE ionization - !Symmetry axis. Reflects particles. - !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. - SUBROUTINE symmetryAxis(edge, part) - USE moduleSpecies - IMPLICIT NONE - - CLASS(meshEdge), INTENT(inout):: edge - CLASS(particle), INTENT(inout):: part - - CALL reflection(edge, part) - - END SUBROUTINE symmetryAxis - !Points the boundary function to specific type SUBROUTINE pointBoundaryFunction(edge, s) USE moduleErrors diff --git a/src/modules/moduleBoundary.f90 b/src/modules/moduleBoundary.f90 index 0b76105..278870f 100644 --- a/src/modules/moduleBoundary.f90 +++ b/src/modules/moduleBoundary.f90 @@ -26,6 +26,12 @@ MODULE moduleBoundary END TYPE boundaryTransparent + !Symmetry axis + TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAxis + CONTAINS + + END TYPE boundaryAxis + !Wall Temperature boundary TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryWallTemperature !Thermal velocity of the wall: square root(Wall temperature X specific heat) @@ -47,11 +53,12 @@ MODULE moduleBoundary END TYPE boundaryIonization - !Symmetry axis - TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAxis - CONTAINS + !Boundary for quasi-neutral outflow adjusting reflection coefficient + type, public, extends(boundaryGeneric):: boundaryOutflowAdaptive + real(8):: outflowCurrent + contains - END TYPE boundaryAxis + end type boundaryOutflowAdaptive !Wrapper for boundary types (one per species) TYPE:: bTypesCont