Read gravity data varying with time
Dear Foam users,
I would like to read the gravity values varying with time from a dataFile located in constant folder. As much as I searched, there is a close post here: http://www.cfd-online.com/Forums/ope...ty-time-2.html In this post, iinterpolationTable<vector> is recommended which can be only used when the gravity values increase. However, I have random value depending on the time such as: 4 ( (0 (10 -5 0)) (0.1 (2 4 0)) (0.2 (-6 1.31 0)) (0.3 (21 0 0)) ... ) Is there anyone let me know how to read these gravity data varying with time. Thank you in advance. |
Hi
Try to use the swak4Foam toolkit. Mehrez |
Quote:
Thank you very much for your reply. Actually, after looking at the interpolationTable code I found how to read the gravitation data from .dat file as follows: Code:
interpolationTable<vector> Acc 4 ( (1 (1 5 4)) (2 (2 4 8)) ... above code works well. My another question is if my time step is 0.5 how can i make interpolation between these values given in .dat file. Any advice will be appreciated. Thank you ________ Moderator note: The following was also asked via PM: Quote:
|
Quick answers @Baris: Sorry, I'm out of time for today and a bit grumpy/hungry, but nonetheless here goes:
|
Quote:
Hi Baris, hi Foamers do you know how to apply the interpolationTable code to read the forces.dat file, that is updated every timestep, in run time? Thanks in advice. Federica |
All times are GMT -4. The time now is 18:31. |