-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First Prototype of Elmer adapter for preCICE with test scenarios (#1)
* Provide two example cases inside adapter * Only supports explicit coupling and no checkpointing * See Thesis "Elmer adapter for preCICE" by Hisham Saeed for details (https://mediatum.ub.tum.de/doc/1636717/7e30s7hdtwhadpuzkb00xdm2l.pdf) Co-authored-by: Benjamin Rodenberg <[email protected]>
- Loading branch information
1 parent
9000d18
commit 76aadb9
Showing
33 changed files
with
9,555 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# ignoring mesh Files | ||
*.boundary | ||
*.elements | ||
*.header | ||
*.nodes | ||
*.names | ||
*.prof | ||
|
||
# ignoring binary files | ||
*.out | ||
*.so | ||
*.mod | ||
|
||
# ignoring precice log files | ||
*events-summary.log | ||
*events.json | ||
|
||
# ignoring specific sif file | ||
entities.sif | ||
venv | ||
|
||
# ignoring results directory | ||
Results/ | ||
build/ | ||
out/ | ||
|
||
# ignoring a (potentially added) FEniCS case | ||
Partitioned_Heat_Conduction/fenics | ||
|
||
# ignoring precice run directory | ||
*/precice-run |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
!------------------------------- | ||
! Inlet Boundary condition v | ||
! velocity in x-direction | ||
!------------------------------ | ||
|
||
|
||
Function SetFlux(model,n, dummy_argument) RESULT(HeatFlux) | ||
|
||
USE DefUtils | ||
|
||
IMPLICIT None | ||
|
||
TYPE(Model_t) :: model | ||
INTEGER :: n | ||
REAL(KIND=dp) :: dummy_argument,HeatFlux | ||
REAL(KIND=dp) :: x,y | ||
REAL(KIND=dp), dimension (10) :: Flux | ||
|
||
CHARACTER(LEN=MAX_NAME_LEN) :: MaskName = "Coupler Interface" | ||
TYPE(Mesh_t), POINTER :: mesh | ||
TYPE(Solver_t),Pointer :: Solver | ||
INTEGER, POINTER :: BCPerm(:) | ||
INTEGER :: vertexSize | ||
LOGICAL :: Visited = .FALSE. | ||
|
||
SAVE Visited,BCPerm | ||
|
||
Solver => model % Solver | ||
Mesh => Solver % Mesh | ||
|
||
|
||
x = model % Nodes % x(n) | ||
y = model % Nodes % y(n) | ||
|
||
! Flux = (/-2.104,-2.307,-2.388,-2.439,-2.458,-2.450,-2.4133,-2.339,-2.202,-2.008/) | ||
Flux = (/-2.008,-2.202,-2.339,-2.4133,-2.450,-2.458,-2.439,-2.388,-2.307,-2.104/) | ||
|
||
|
||
|
||
IF(.NOT. Visited) THEN | ||
|
||
NULLIFY( BCPerm ) | ||
ALLOCATE( BCPerm( Mesh % NumberOfNodes ) ) | ||
BCPerm = 0 | ||
|
||
CALL MakePermUsingMask( Model, Solver, Mesh, MaskName, .TRUE., & | ||
BCPerm, vertexSize ) | ||
Visited = .TRUE. | ||
END IF | ||
|
||
! HeatFlux = Flux(BCPerm(n)) | ||
HeatFlux = -1.9 | ||
!Print *,HeatFlux,n,BCPerm(n),Flux(BCPerm(n)) | ||
|
||
! LOGICAL :: Visited = .FALSE. | ||
|
||
! INTEGER :: vertexSize | ||
! INTEGER, POINTER :: BCPerm(:) | ||
! TYPE(Mesh_t), POINTER :: mesh | ||
! TYPE(Solver_t) :: Solver | ||
! CHARACTER(LEN=MAX_NAME_LEN) :: maskName | ||
|
||
! SAVE Visited,BCPerm | ||
|
||
! IF (.NOT. Visited) THEN | ||
|
||
! maskName = 'Coupler Interface' | ||
|
||
! Solver = model % Solver | ||
! Mesh => Solver % Mesh | ||
|
||
! NULLIFY( BCPerm ) | ||
! ALLOCATE( BCPerm( Mesh % NumberOfNodes ) ) | ||
! BCPerm = 0 | ||
! ! CALL MakePermUsingMask( Model, Solver, Mesh, MaskName, .FALSE., & | ||
! ! BCPerm, vertexSize ) | ||
! CALL MakePermUsingMask( Model, Solver, Mesh, MaskName, .TRUE., & | ||
! BCPerm, vertexSize ) | ||
! CALL Info('CouplerSolver','Number of nodes at interface:'//TRIM(I2S(vertexSize))) | ||
! Visited = .TRUE. | ||
! END IF | ||
|
||
! vertecies = (/1.3683,-2.8982,-1.1475,-0.5913,-0.3677,-0.2596,-0.2236,-0.2578,-0.4033,-0.9204,-0.5099/) | ||
|
||
! ! Print *, n,BCPerm(n) | ||
|
||
! tempLoads = vertecies(BCPerm(n)) | ||
|
||
|
||
END FUNCTION SetFlux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
elmerf90 -o Coupler_Solver.so Coupler_Solver.F90 /usr/lib/x86_64-linux-gnu/libprecice.so.2 | ||
elmerf90 -o Print_Module.so Print_Module.F90 /usr/lib/x86_64-linux-gnu/libprecice.so.2 | ||
elmerf90 -o UDF_Boundary.so UDF_Boundary.F90 /usr/lib/x86_64-linux-gnu/libprecice.so.2 |
Oops, something went wrong.