Skip to content
MaxCan-Code edited this page Nov 1, 2022 · 1 revision

\titlepage

About Me

Computational scientist

  • Numerical partial differential equations (PDEs)

Programming language enthusiast

  • Dependent types
  • Lisps/Schemes
  • Functional programming/Theorem provers

Outline

\tableofcontents

Physical Problem

Electroreception

Electric Sensing

  • Characterize environment from its electric field

Weakly electric fish

  • generates field with EOD[fn:: Electric Organ Discharge]
  • senses perturbation on skin
  • locates object

Fish fig

Formulate Model

Translate to Physics

English → Physics

  • EOD → Plane of point charges
  • Object → Dielectric constant
  • Perturbation = Object field - Empty field

Now what

\pause How do we solve this?

\pause FEniCSx can help!

Simulate/Solve

Simulate it!

FEM DUMP

FEniCSx can …

  1. Make a mesh
    • where we save our solution
  2. Object → Dielectric constant
    • mark location & value on mesh
  3. EOD → Plane charge
    • define as source term
  4. Solve → Object field
  5. Same thing without object

Mesh Fig

./pix/un-refn-mesh.jpeg \pause

Perturbation

Object field - Empty field

Results and Discussion

Visualize

Cross section of 3D mesh \pause

./pix/pert-sphere.jpeg

Convergence

Empty field (point charges) has exact solution

  • finer mesh \(\implies\) lower error, hopefully
  • even finer mesh → high performance computing

\pause

./pix/refn-mesh.jpeg

Conclusion

Recap

\tableofcontents

\secname

2 key players

  • EOD
  • Dielectric object

\pause Now what?

\pause Your turn, I told you all the steps

\pause Also my thesis with Greg Lewis

\pause https://faculty.uoit.ca/lewis

https://github.com/MaxCan-Code/thesis

Questions?

Appendix

Future work

  • Stuck: Apptainer on Graham
    • Read-only container → MPI breaks
    • MPI works outside

FEniCSx

  • Easy way to solve PDEs with FEM
  • DSL for variational form (UFL)
  • Python interface
  • FOSS
Learn more: "FEniCSx doc/tutorial"

HPC

  • Apptainer
  • Slurm
  • Unix
    • shell
    • ssh

Pix

./pix/empty-field.jpeg

./pix/pert-box.jpeg

FEM

BVP

\[ ε e2\underbrace{ψ e}\text{Empty field} = \underbrace{∑ qi δ (xi )}\text{point sources} \]

  • Field perturbed by dielectric object \( S\ ( ψ o ) \):

\[ ∇ \cdotp (ε ∇ ψ o )=∑ qi δ (xi ), \qquad ε =\begin{cases} ε i & \text{internal to } S
ε e & \text{external to } S \end{cases} \] \[ \underbrace{δ ψ }\text{Perturbation} =ψ oe \]

  • Natural (Neumann) BC: (\( ∇ ψ \cdotp \vec{n} = 0 \)) on boundary

Variational Formulation

\[ ∇ \cdotp (ε ∇ ψ o )=∑ qi δ (xi ) \]

  • Multiply the PDE by a function \( v \)
  • Integrate the resulting equation over the domain \( Ω \)

\[ ∫ Ω [ ∇ \cdotp (ε ∇ ψ o )] v\ \mathrm{d} x = ∫ Ω fv\ \mathrm{d} x = ∑ qiΩ δ (xi )v\ \mathrm{d} x \] \[ ∫ Ω ε ∇ ψo \cdotp ∇ v\ \mathrm{d} x = ∑ qi v(xi ) \]

  • Weaker continuity requirement on \( ε\psio \)