Page 1 of 1

Specifying coordinates in Fortran code

Posted: 25 Jun 2021, 21:03
by lmehdizadegannam
Hello,

I am using t(1), t(2), t(3), t(4) to get time and x, y, z coordinates in the Fortran code that I am implementing along with the sif file. However, I am getting really small values for t(2) and t(3). (8.1108978441432417E-318 and 3.6912158229071204E-317). It seems I did not get this right. Can you guide me how I can include node coordinates correctly in my model?

Thanks so much.
Best,
Lida

Re: Specifying coordinates in Fortran code

Posted: 25 Jun 2021, 22:21
by kevinarden
I think the index may start with zero. t(0), t(1), t(2), t(...)

Re: Specifying coordinates in Fortran code

Posted: 25 Jun 2021, 22:23
by Rich_B
Hello,

Take a look at
elmerfem\fem\tests\fsi_beam
this test includes an F90 routine that should be helpful. The first parameter of the function call is 'Model', which gives you access to all of the model variables, such as coordinates.

Rich.

Re: Specifying coordinates in Fortran code

Posted: 25 Jun 2021, 23:36
by lmehdizadegannam
Thanks so much Kevin and Rich for your prompt responses. I used the fsi_beam as an example and managed to resolve the issue. Thank you very much for your help.

Kindest regards,
Lida