Reply To: About VTI file in porousmedia
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › About VTI file in porousmedia › Reply To: About VTI file in porousmedia
June 2, 2025 at 10:43 am
#10318
luizeducze
Participant
Dear Jafari,
From your message I see an error in the code. I am really sorry for that.
You can see in the code that we have some numbers in operations like 0.5, or 2. The correct way is to define T(0.5) or T(2.), so they can be converted to float for gpu running.
Just do the following procedure. Replace for example:
length[0] + outletLength – inletLength )/2.
by:
length[0] + outletLength – inletLength )/T(2.)
And do the same thing for all free numbers in the code.
Kind regards,
Luiz