FESTIM icon indicating copy to clipboard operation
FESTIM copied to clipboard

Cylindrical and spherical versions of derived quantities

Open RemDelaporteMathurin opened this issue 1 year ago • 5 comments

Following what was done in #689 we need an implementation of the cylindrical and spherical versions of

  • [ ] TotalVolume
  • [ ] TotalSurface
  • [ ] AverageVolume #820
  • [ ] AverageSurface #820

2D axisymmetric

In 2D axisymmetric, the surface element ds is ds = r dr dtheta or ds = r dz dtheta In both cases, in fenics integrating a function f is assemble(f * r * ds) where r is the radius.

dV = r dr dtheta dz Integrating a function f in fenics is therefore assemble(f * r * dx) where r is the radius.

1D spherical

The surface element in 1D spherical is: dS_r = r^2 sin(theta) dtheta dphi The integral of f on a spherical surface is therefore integral(f dS_r) = integral(f r^2 sin(theta) dtheta dphi) = (phi2 - phi1) * (-cos(theta2) + cos(theta1)) * f r^2 The volume element is

dV = r^2 sin(theta) dr dtheta dphi the integral of f on a spherical volume is therefore

integral(f dV) = (phi2 - phi1) * (-cos(theta2) + cos(theta1)) * integral(f r^2 dr)

phi is the polar angle and theta is the azimuthal angle

RemDelaporteMathurin avatar Mar 27 '24 19:03 RemDelaporteMathurin

This is going to be very useful, I'm planning to help soon

gabriele-ferrero avatar Jul 25 '24 13:07 gabriele-ferrero

@gabriele-ferrero If you wanna do the TotalVolume and TotalSurface ones I can do the Average ones

jhdark avatar Jul 25 '24 14:07 jhdark

@jhdark @gabriele-ferrero I "assigned" you to this issue. Let me know if you need help and if you want to have this in 1.3

RemDelaporteMathurin avatar Jul 25 '24 14:07 RemDelaporteMathurin

I suppose, HydrogenFlux and ThermalFlux also require cylindrical/spherical versions.

KulaginVladimir avatar Aug 21 '24 18:08 KulaginVladimir

@rekomodo is having a go at implementing the remaining classes

RemDelaporteMathurin avatar Aug 29 '24 20:08 RemDelaporteMathurin