quinoacomputing / quinoa

Adaptive computational fluid dynamics
https://quinoacomputing.github.io
Other
100 stars 21 forks source link

Store initial state of density field for solid materials #586

Open airaudofacundo opened 9 months ago

airaudofacundo commented 9 months ago

For 3D cases involving solid materials, a correction source term needs to be computed which uses the value of rho for each material at t=0. We need some way to store this value to use it in SolidTerms.cpp.

adityakpandare commented 6 months ago

@airaudofacundo, considering that the initial density for each solid is uniform (for now at least), would storing a single value for each material be sufficient? i.e. is my understanding correct, that the initial density for each material at each mesh entity is not required, and only one value for each material will suffice?

airaudofacundo commented 6 months ago

@adityakpandare For all cases that I've run and considered, having a single initial density per material should be fine, yes. I remember you telling me about possibly some test cases containing a linear distribution of density or something like that. In that case something more general would be needed, but as far as my cases are concerned, your solution should suffice.

adityakpandare commented 1 month ago

Done in https://github.com/quinoacomputing/quinoa/commit/bc0df3aedaedc79aaa109e0d2314db500a593b26. Initial density of material specified as a solid eos-parameter inside the material block as

rho0 = { 1234.56, 67.8, ... }

The number of entries in the rho0 vector is equal to number of materials of that eos-type.

adityakpandare commented 2 weeks ago

It would be better to compute rho0 based on the initial state and store it, rather than accept it as a user input.