How to write the sampled field values of a curved internal surface?
I am trying to sample the field values on an internal curved surface. The way I managed to sample the values was using the function object surfaceInterpolate in controlDict. For this I created a dummy surface where I needed the sampling and defined it as "empty" physical surface, and correspondingly making it empty in each 0 folder files.
Code:
functions So am wondering if there's any way I can write these sampled field values to a (csv) file? |
You may define lines where you get the results. Here an example:
Code:
setFormat raw; |
Quote:
Thanks Uwe for a quick example. I just tried this, in my case it will probably be arcUniform type. However, this method requires me to use start and end angle values. This will not be very convenient when I have changes in the dimensions. I intend to do multiple simulations by changing cylinder diameters. That's why a defined patch name would be very convenient, I thought. Additionally, I do not want to specify number of cells manually. Any way out in that case? |
Ok, I tried to parameterise it so that it makes a little more convenient.
But it seems mag(U) is not recognised now. Strange. On the forum it doesn't seem like it's been noticed in recent times. Update: I realised why. It couldn't recognise the field because it doesn't exist! Found an easy way to tackle this by including #includeFunc mag(U) in controlDict |
All times are GMT -4. The time now is 22:46. |