RemDelaporteMathurin / 3-MOT

3-MOT is a multi-physics software relying on FEniCS.
3 stars 1 forks source link

Thermal properties temperature dependent #26

Open RemDelaporteMathurin opened 6 years ago

RemDelaporteMathurin commented 6 years ago

Coucou

shimwell commented 6 years ago

We would need to change the following functions in 3-MOTtiedup.py

calculate_specific_heat() calculate_density_heat() calculate_thermal_conductivity_heat()

shimwell commented 6 years ago

Perhaps as a first attempt we could use some simple SciPy interpolation as demonstrated here

https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html#scipy.interpolate.interp1d

RemDelaporteMathurin commented 6 years ago

Could this be done in an external library ?

RemDelaporteMathurin commented 6 years ago

Hey @Shimwell look what I found!

ft11_magnetostatics.py.zip

class Permeability(Expression): def init(self, markers, *kwargs): self.markers = markers def eval_cell(self, values, x, cell): if self.markers[cell.index] == 0: values[0] = 4pi*1e-7 # vacuum elif self.markers[cell.index] == 1: values[0] = 1e-5 # iron (should really be 6.3e-3) else: values[0] = 1.26e-6 # copper

mu = Permeability(markers, degree=1)