From abedb79b1651386d39e4e08c9de877a66a6d70e4 Mon Sep 17 00:00:00 2001 From: JGonzalez Date: Fri, 12 Jul 2024 11:02:26 +0200 Subject: [PATCH] Some comments Just some comments on how I am going to make the desired changes (have a Dirichlet boundary condition for the electric potential that changes with time). This might be a good opportunity to rework the boundary conditions in the electrostatic field and include other things like a Newmann boundary condition. We will see. --- src/modules/init/moduleInput.f90 | 6 ++++++ src/modules/solver/electromagnetic/moduleEM.f90 | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/modules/init/moduleInput.f90 b/src/modules/init/moduleInput.f90 index 6f1d5bb..4216c73 100644 --- a/src/modules/init/moduleInput.f90 +++ b/src/modules/init/moduleInput.f90 @@ -1173,6 +1173,12 @@ MODULE moduleInput IF (.NOT. found) & CALL criticalError('Required parameter "physicalSurface" for Dirichlet boundary condition not found', 'readEMBoundary') + CASE ("dirichletTime") + CALL config%get(object // '.potential', boundEM(i)%potential, found) + IF (.NOT. found) & + CALL criticalError('Required parameter "potential" for Dirichlet boundary condition not found', 'readEMBoundary') + boundEM(i)%potential = boundEM(i)%potential/Volt_ref + CASE DEFAULT CALL criticalError('Boundary type ' // boundEM(i)%typeEM // ' not yet supported', 'readEMBoundary') diff --git a/src/modules/solver/electromagnetic/moduleEM.f90 b/src/modules/solver/electromagnetic/moduleEM.f90 index d5d0793..f6c7112 100644 --- a/src/modules/solver/electromagnetic/moduleEM.f90 +++ b/src/modules/solver/electromagnetic/moduleEM.f90 @@ -2,6 +2,7 @@ MODULE moduleEM IMPLICIT NONE + ! TODO: Make this a derived type. TYPE:: boundaryEM CHARACTER(:), ALLOCATABLE:: typeEM INTEGER:: physicalSurface @@ -9,6 +10,7 @@ MODULE moduleEM CONTAINS PROCEDURE, PASS:: apply + !PROCEDURE, PASS:: update !only for time dependent boundary conditions or maybe change apply????? That might be better. END TYPE boundaryEM