v0.14.0
Introduction

This directory contains the sources and mesh files for the tutorial [SCL-12: Electrostatics]. It uses finite element methods to compute the electrostatic quantities based on a give intial boundary conditions and charge configurations. The tutorial provides code to get the solutions for the electrostatic potential due the the presence of charge at the interface. Additionally, as part of the post-processing calculations, the tutorial also provides the amount of total charge on a surface, the internal energy density, and the total internal energy of the system.

Mesh generation

Meshes are generated by Coreform Cubit. Here is a sample Journal file to create a suitable mesh:

reset set duplicate block elements on brick x 5 y 5 z 100

webcut volume 1 with plane zplane offset 2.5 webcut volume 2 with plane zplane offset -2.5

imprint all merge all

#BOUNDARY_CONDITION block 1 surface 2 block 1 name 'BOUNDARY_CONDITION_1' block 1 attribute count 1 block 1 attribute index 1 0.0

block 4 surface 7 block 4 name "ELECTRODE_1"

block 5 surface 17 block 5 name "ELECTRODE_2"

# block 11 surface 7 block 11 name "INT_ELECTRIC_1" block 11 attribute count 1 block 11 attribute index 1 20

block 12 surface 17 block 12 name "INT_ELECTRIC_2" block 12 attribute count 1 block 12 attribute index 1 -20 # block 100 volume 1 block 100 name "MAT_ELECTRIC_1" block 100 attribute count 1 block 100 attribute index 1 1

block 101 volume 2 block 101 name "MAT_ELECTRIC_2" block 101 attribute count 1 block 101 attribute index 1 1

block 102 volume 3 block 102 name "MAT_ELECTRIC_3" block 102 attribute count 1 block 102 attribute index 1 1

block 201 volume 2 block 201 name "DOMAIN_INT"

volume all scheme tetmesh volume all size auto factor 8
mesh volume all

Mesh partition

mofem_part -file_name elec_3D.cub -output_file elec_3D_4p.h5m -nparts 4 -dim 3 mofem_part -file_name elec_2D.cub -output_file elec_2D_4p.h5m -nparts 4 -dim 2

Run the program

mpirun -np 4 ./electrostatics_3d -file_name elec_3D_4p.h5m mpirun -np 4 ./electrostatics_2d -file_name elec_2D_4p.h5m