febiosoftware / FEBioStudio

https://febio.org/
MIT License
64 stars 21 forks source link

Cannot enter a decimal separator for properties of some materials #51

Open FEA-eng opened 1 year ago

FEA-eng commented 1 year ago

Hi,

I can't enter a decimal separator (dot) in any of the fields used to define the properties of some material models (like isotropic elastic or Mooney-Rivlin). Dot is just ignored there. However, it works if I enter constants e.g. for neo-Hookean material. A workaround is to specify properties like 3e-1 but I guess that it's a bug after all since it works for some material models.

Edit: it happens not only with material definitions but also with contact properties.

SteveMaas1978 commented 1 year ago

We recently released FEBio Studio 2.0. Would you mind testing whether this issue remains in this new version? Thanks!

Steve

FEA-eng commented 1 year ago

We recently released FEBio Studio 2.0. Would you mind testing whether this issue remains in this new version? Thanks!

I checked in FEBio Studio 2.0. Now it's working with isotropic elastic material but not with Mooney-Rivlin, incomp neo-Hokean, visoelastic and likely also other material models.

SteveMaas1978 commented 1 year ago

Thanks for the feedback. That is interesting that it works for some materials, but not others since internally all materials use the same mechanism for defining their parameters.

Can you please tell me what OS you are using and what your language is set to on your computer?

FEA-eng commented 1 year ago

That is interesting that it works for some materials, but not others since internally all materials use the same mechanism for defining their parameters.

What's even stranger is that it works for example for C1, C2 and the density of Mooney-Rivlin material but not for its bulk modulus. When it comes to viscoelastic material, it works only for the density.

Can you please tell me what OS you are using and what your language is set to on your computer?

Sure, I am using Windows 10 and 11 (this error occurs on all of my computers). They all have a system language set to Polish.

SteveMaas1978 commented 1 year ago

I made some progress. I changed my system language to Polish and was able to reproduce the issue. Apparently, for Polish, the decimal point is a comma. So you can enter decimal numbers with commas, but the code that reads the numbers expect a period.

Now that I can reproduce the issue, I'm hopeful that I'll be able to resolve this soon. I'll keep you posted.

FEA-eng commented 1 year ago

@SteveMaas1978 There seems to be some improvement in the newest version (2.1.1) regarding this issue. I can enter dot (comma resets the value) for isotropic elasticity, for instance. However, it still doesn't work for the bulk modulus of the Mooney-Rivlin material model among the others (also for viscoelasticity as explained above). Was there any fix implemented for this issue or is it just a coincidence that it started working in some cases?

SteveMaas1978 commented 1 year ago

Unfortunately, I did not get a chance to continue looking into this, so there have not been any changes implemented to address this issue. I suspect that the variables for which it seems to work, allow you to enter any non-numeric data. I am curious, for the variables that work, what gets output when you export the model to an febio input file? And what happens when you run the file? Does it work? You can check the log file to see what variables febio actually read in.

FEA-eng commented 1 year ago

@SteveMaas1978 Surprisingly, Poisson's ratio defined this way (by typing 0.3 directly instead of 3e-1) is recognized properly. It would be great if you could take a look at this issue at some point in the near future.