amir-cardiolab / PINN-wss

PINN for obtaining WSS from sparse data
53 stars 17 forks source link

IA-3D Question #4

Open johneseAndrew opened 10 months ago

johneseAndrew commented 10 months ago

Your model has a diameter of 0.3 mm and a length of 3 mm. In lines 712 and 713 of the code, X_scale represents the length of the model. Then I would like to ask what does YZ_scale represent? Why fill in 2 instead of the diameter of the model? Looking forward to your answers , thank you.

amir-cardiolab commented 10 months ago

That is the max value of Y and Z coordinates in the domain of interest. They both had the same max so one variable is used. The diamater is not used because we are not in polar coordinates here.

johneseAndrew commented 10 months ago

So where can I find out what my maximum value is? Or how to set a correct YZ_SCALE? For example, I have an abdominal aortic aneurysm with a length of 100 mm and a diameter of 20 mm. I set up the model in the same way as you. Where can I know the maximum value?

amir-cardiolab commented 10 months ago

You need to non-dimensionalize your governing equations such that your x, y, and z (also outputs) are varying between -1 and 1 (normalized). So these scales are problem dependent. Based on your geometry and coordinate system you should set them such that the input to your neural network is normalized. So it really depends on how your x, y, and z are varying.

johneseAndrew commented 10 months ago

Does it mean that we need to calculate the governing equation first and then decide what YZ_SCALE is? Thank you.

amir-cardiolab commented 10 months ago

Not sure what you mean by calculate. But PINN is all about governing equations. You need to first write them in non-dimensional form, just like the code, and then based on how you non-dimensionalize your variables (so each are on the order of 1), your scales will be defined. Basically, just think about it this way: You are solving the problem in non-dimensional form (see for example non-dimensionalizing Navier-Stokes equations in undergraduate fluid mechanics textbooks).

johneseAndrew commented 9 months ago

Hello, In lines 762 to 765, I would like to ask what does xend and yend represent. How to change this value or where can I find out what the value is? I originally guessed it was the size of the model, but the size of the model did not match this value. Looking forward to your answers, thank you.

amir-cardiolab commented 9 months ago

It is the range of the input coordinates. It gets normalized by X_Scale...