comp-physics / RBC3D

3D Spectral boundary integral solver for cell-scale blood flow
MIT License
7 stars 3 forks source link

Put cell moduli in input file `tube.in` #11

Open sbryngelson opened 6 months ago

sbryngelson commented 6 months ago

It seems like the cell properties (type, moduli) should really be in Input/tube.in or something similar.

sbryngelson commented 3 weeks ago

@suzanmanasreh is this possible or no? it seems like it should be easy but maybe I'm missing a detail here. it would be nice to take such parameters out of the .F90 files in the examples/cases.

suzanmanasreh commented 3 weeks ago

Yes, it technically would be easy to move radEqv, nlat0, ES, ED, EB, vBkg, etc.., and could potentially get rid of a few bugs (ex: if vBkg in initcond and tube don't match, the sim crashes). I saw someone else already do that in a fork.

Ideally the examples would just be all inputs and the F90 code would be in some folder called pre_process or launch_sim, but there's no real one-size fits all for the place cell functionality, so if just a few things were moved, someone still has to change initcond to create a new case.

sbryngelson commented 3 weeks ago

It seems like the most reasonable solution is to move commonly used initial condition subroutines to the core common code, add the cell parameters to the input file, and make the initcond.F90 files as minimal as possible such that basically no code is duplicated.

suzanmanasreh commented 3 weeks ago

Yeah that's probably necessary after my last change. One problem is knowing what cell to create for each celltype. I don't really want to hardcode celltype 1 as RBC, 2 as WBC, 3 as sickle cell, but it would probably be necessary to support this refactor or have some bit to set for each celltype if that celltype is a RBC and so on. Also, I think the restart procedure would have to be specified via input file if tube is taken out.

suzanmanasreh commented 1 week ago

wait i actually think having the components that make up the modulus values (wall shear rate, shear modulus in N/m, plasma viscosity, ...) would be more useful, so you can easily change shear rate and such like in other papers. i've been using this for all the cells (rbcs, wbcs, platelets), but sickle cells have their modulus values set arbitrarily, so i have no idea what to do about that

sbryngelson commented 5 days ago

how is that different from what i suggested

suzanmanasreh commented 5 days ago

shear rate and plasma viscosity aren't simulation parameters. they're used with equivalent radius to make the physical shear and bending modulus in N/m into dimensionless values for the simulation. i'm probably not going to complete this myself though, so it doesn't matter

sbryngelson commented 5 days ago

Yes this is intentional.

suzanmanasreh commented 5 days ago

why would that be intentional? it just makes it so i have to calculate more stuff

sbryngelson commented 5 days ago

The physics changes with the dimensionless parameters, not the dimensional ones. We often work hard to figure out the relevant dimensionless parameters that govern the physics of a flow, so that we can focus on changing those parameters.

Some famous examples of this are here: https://en.wikipedia.org/wiki/Dimensionless_numbers_in_fluid_mechanics

Though this idea applies broadly.