ZELLMECHANIK-DRESDEN/ShapeOut

Add option for isoelasticity lines from numerical simulation LUT, but keep analytical isoelastics

Closed this issue · 11 comments

An option to use isoelasticity lines from the numerical simulations should be added, but the old version of the analytical isoelastics should also be kept in the program for continuity reasons.
(make two checkboxes? or one checkbox and a switch?)

Isoelasticity lines for a 20 um channel at 0.04 ul/s flow rate and 15 mPas viscosity were linearly interpolated from the extended LUT at values for the elastic modulus of 6.9, 5.4, 4.2, 3.6, 3.0, 2.55, 2.1, 1.8, 1.5, 1.2, and 0.9 kPa.

isoel-numerical-area_um-deform.txt

(BTW: I had a look at the current analytical isoelastics and found that unlike described in the header the values given for the elastic property in column 3 are NOT the elastic or Young's modulus E but the Shear modulus G. This means that to get to E those values would have to be multiplied by a factor of 3 assuming a Poisson ratio of 0.5 for volume conservation)

The isoelastics can be scaled for different channel sizes in the usual way by rescaling the area values with a factor of (ChannelWidth/20)^2. ChannelWidth in um.

E values of the individual isoelastics rescale with a factor of
(FlowRate * Viscosity * 20^3) / (0.04 * 15 * ChannelWidth^3).
FowRate in ul/s, Viscosity in mPas, ChannelWidth in um.

In order to account for the pixelation offset in the deformation values the following size dependent offset should be added to the deformation values of the numerical isoelastics after rescaling for the channel size (see https://arxiv.org/abs/1704.00572):

delta deformation = 0.0012 + 0.02 * exp(-A/7.1) + 0.01 * exp(-A/38.6) + 0.005 * exp(-A/296)

This was retrieved for a pixel resolution of 0.34 um/pix. In order to use this correction also for a different pixel resolution (e.g. using a different objective) a scaling can be introduced as:

delta deformation = 0.0012 + 0.02 * exp(-A * K/7.1) + 0.01 * exp(-A * K/38.6) + 0.005 * exp(-A * K/296)

with K = (0.34/PixelResolution)^2. PixelResolution in um/pix.
This scaling could also be added to the procedure for the mapping of the Young's modulus.

Thanks!
A few points that need to be addressed still:

  • In ShapeOut, the best way to handle isoelastic selection would be a dropdown menu with the choices ["no isoelastics", "analytical", "numerical", "legacy (prior to version 0.8.x)"] or some-such.

  • As mentioned in #145, it would make sense to have the analytical isoelastics computed at the same values of the Young's modulus E as for the numerical isoelastics; i.e. it would be nice to have analytical isoelastics at 6.9, 5.4, 4.2, 3.6, 3.0, 2.55, 2.1, 1.8, 1.5, 1.2, and 0.9 kPa. Since the old isoelastics show the shear modulus G, the corresponding file would have to be updated anyway. @chrherold Could you please compute these analytical isoelastics?

  • The correction for the area and for the Young's modulus are already implemented in dclab. The pixelation correction is implemented only for the LUT but not for the isoealstics (see DC-analysis/dclab#28). This will change the displayed isoelastics! I will implement it.

  • The pixel size correction needs to be implemented for the LUT and for the analytical/numerical isoelastics (also DC-analysis/dclab#28). I will implement this.

In ShapeOut, the best way to handle isoelastic selection would be a dropdown menu with the choices ["no isoelastics", "analytical", "numerical"] or some-such.

sounds good!

As mentioned in #145, it would make sense to have the analytical isoelastics computed at the same values of the Young's modulus E as for the numerical isoelastics; i.e. it would be nice to have analytical isoelastics at 6.9, 5.4, 4.2, 3.6, 3.0, 2.55, 2.1, 1.8, 1.5, 1.2, and 0.9 kPa. Since the old isoelastics show the shear modulus G, the corresponding file would have to be updated anyway. @chrherold Could you please compute these analytical isoelastics?

Currently the analytical isoelastics are calculated for 6.9, 5.4, 4.2, 3.0, 2.4, 1.8, 1.5, 1.2 and 0.9 kPa. So what was changed in the numerical case is 2.55 instead of 2.4 and in addition 3.6 and 2.1. This was chosen for a more "equal" blanket of isoelastics at higher (>0.03) deformations.

I could also calculate the analytical solutions for 2.1, 2.55 and 3.6 kPa. BUT I have one larger concern that also involves

The pixelation correction is implemented only for the LUT but not for the isoealstics (see DC-analysis/dclab#28). This will change the displayed isoelastics! I will implement it.

I think that to keep it continuous there should be on option that allows the user to display isoelastics as it was implemented until now. (no pixel corrections, no change of line positions)

I am not sure if there is use in having another option of the the analytical solutions with pixel correction in it. The analytical solution will start to deviate quite strongly from the numerical simulations for deformation values > 0.03 or for large objects of larger than roughly 80% of the channel size. This is supposed to happen, because the analytical solution does not consider how a changed geometry of the deformed object changes the flow/pressure acting on it. So if the analytical solution would be implemented here in the same way the numerical solution is, all that could be gained is what was shown already in M. Mokbel et al. : Numerical and analytical solutions give identical results for small deformations and reasonably sized objects. And beyond that the analytical solution is not to be used (because of known simplifications) if a numerical solution is available.

Ok, I still think we should support pixelation correction for the analytical isoelastics, because it makes the user experience with isoelastics consistent.

Here is my proposal:

  1. In the dropdown menu, we could have ["not shown", "numerical", "analytical", "analytical (legacy)"].
  2. "analytical (legacy)" will not show isoelasticity lines at 2.1, 2.55 and 3.6 kPa and will not have pixelation correction.
  3. If a user opens an old session file, "analytical (legacy)" is used.
  4. Otherwise, the default should be "numerical"

Another point: regarding the pixelation correction for the numerical isoelasitcs:

This scaling could also be added to the procedure for the mapping of the Young's modulus.

Currently, pixelation correction (and pixel size correction with K) is not performed for the LUT, but only for the data that is mapped with the LUT (the LUT deformation is assumed to be perfect). Please confirm that this should also be applied to the LUT itself. At which pixel size [µm/px] were the simulations performed?

This is possibly confusing. Another way to put it: Should the LUT deformation be corrected for pixelation and pixel size before the emodulus for the experimental data (whose deformation is already corrected for pixelation and pixel size) is interpolated?
If yes, I guess it would make sense to already have the corrected values for deformation in the LUT (and the isoelastics)? Or does this correction have to happen after the conversion of area and emodulus?

I made a new set of analytical isoelasticity lines for 6.9, 5.4, 4.2, 3.6, 3.0, 2.55, 2.1, 1.8, 1.5, 1.2, and 0.9 kPa. I restricted the deformation range to a maximum of 0.03.

isoel-analytical.txt

I noticed, that the new lines do not perfectly overlay with the legacy lines and I could not figure out why. My best guess is that the legacy lines were calculated some mixture of square and cylindrical channel geometry. However, I was not able to reconstruct the exact legacy lines with all tweaks to the parameters I could think of. Now this is only a minor problem, as the deviation is rather small,all trends are correct, and the legacy lines where always intended as a guide to the eye rather than a precise quantitative tool.

I also checked the new analytical iso-lines against the numerical ones and found them to match as expected for low deformation and larger objects. They deviate stronger if objects are smaller and have a low elasticity, but also this is to be expected.

I like your proposal for the drop down menu but I would name the "analytical (legacy)" only "legacy (prior to version 0.8.x)" to make the difference more clear.

Currently, pixelation correction (and pixel size correction with K) is not performed for the LUT, but only for the data that is mapped with the LUT (the LUT deformation is assumed to be perfect). Please confirm that this should also be applied to the LUT itself. At which pixel size [µm/px] were the simulations performed?

This is possibly confusing. Another way to put it: Should the LUT deformation be corrected for pixelation and pixel size before the emodulus for the experimental data (whose deformation is already corrected for pixelation and pixel size) is interpolated?
If yes, I guess it would make sense to already have the corrected values for deformation in the LUT (and the isoelastics)? Or does this correction have to happen after the conversion of area and emodulus?

You are right, this was a bad phrasing of the suggestion from my side. We decided to "correct" the data and use the corrected values for the LUT to avoid strange effects in interpolation towards the boundaries of the LUT (due to correction induced curvatures of the boundaries).

Just to make sure: the data is only temporarily corrected when the E values are looked up. There is no permanent correction to the data, correct?

So what should be done is to make the temporary correction of the data variable with the pixel resolution. This means subtraction of the "delta deformation" as described above from the data during use of the LUT.

The currently implemented correction was simulated for a pixel resolution of 0.34 um/pix. Therefore, the introduced variablitiy factor K would be 1 for a pixel resolution of 0.34. And the correction should be exactly as it is now.
If the pixel resolution is different, the calculated deformation offset will decay faster with object size, if the pixel resolution is smaller (and vice versa).

You are right, this was a bad phrasing of the suggestion from my side. We decided to "correct" the data and use the corrected values for the LUT to avoid strange effects in interpolation towards the boundaries of the LUT (due to correction induced curvatures of the boundaries).

Ok, so only the area and emodulus of the LUT are converted (no pixelation correction). Pixelation correction is applied to the experimental data before interpolation. Since you derived the numerical isoelastics from the LUT, these are already corrected for pixelation as well. What about the analytical isoelastics?

Just to make sure: the data is only temporarily corrected when the E values are looked up. There is no permanent correction to the data, correct?

Yes.

So what should be done is to make the temporary correction of the data variable with the pixel resolution. This means subtraction of the "delta deformation" as described above from the data during use of the LUT.
The currently implemented correction was simulated for a pixel resolution of 0.34 um/pix. Therefore, the introduced variablitiy factor K would be 1 for a pixel resolution of 0.34. And the correction should be exactly as it is now.
If the pixel resolution is different, the calculated deformation offset will decay faster with object size, if the pixel resolution is smaller (and vice versa).

So for the LUT, the only change of the pixelation correction is the additional pixel size correction applied to the experimental data before interpolation.

Regarding the isoelastics:
If I subtract delta_deformation from the data before interpolation with the LUT, does that mean I have to add delta_deformation to the isoelastics (an error is added to the isoelastics on purpose to make them match the deformation data shown)? If this is true, then I think I got your point.

If I subtract delta_deformation from the data before interpolation with the LUT, does that mean I have to add delta_deformation to the isoelastics (an error is added to the isoelastics on purpose to make them match the deformation data shown)? If this is true, then I think I got your point.

Exactly, that is correct.

@chrherold The analytical isoelastics have a maximum deformation value of about 0.025. This looks like a typo to me. Could you please compute them up to a deformation value of about 0.25?

You can now test the new isoelastics:
https://ci.appveyor.com/project/paulmueller/shapeout/build/1.0.831/job/j60lmk76t6e0fe3y/artifacts

Todo:

  • compute correct analytical isoelastics (@chrherold ) and update them in dclab
  • make sure legacy isoelastics are loaded when opening an old session file

The analytical isoelastics have a maximum deformation value of about 0.025. This looks like a typo to me. Could you please compute them up to a deformation value of about 0.25?

It is intentionally less than 0.03 as the analytical solutions are not supposed to be used for higher deformations. And the analytically obtaimed shapes at high deformations are physically impossible.