|
[Sponsors] |
How to write the sampled field values of a curved internal surface? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 15, 2021, 13:51 |
How to write the sampled field values of a curved internal surface?
|
#1 |
New Member
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5 |
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 { dummySurfaceData { type surfaceInterpolate; //surfaceFieldValue; libs ("libfieldFunctionObjects.so"); writeControl writeTime; writeFields true; surfaceFormat raw; regionType faceZone; //faceZone; name dummySurface; operation none; fields ( (p pNear) (T TNear) (U UNear) ); } } So am wondering if there's any way I can write these sampled field values to a (csv) file? |
|
July 15, 2021, 14:31 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
You may define lines where you get the results. Here an example:
Code:
setFormat raw; surfaceFormat raw; type sets; libs ("libsampling.so"); interpolationScheme cellPoint; fields ( U ); // Fields to sample. sets ( w0 { type lineUniform; axis distance; nPoints 500; start ( -0.03 0 0 ); end ( -0.06 0 0 ); } w5 { type lineUniform; axis distance; nPoints 300; start ( -0.0295442 0.00520945 0 ); end ( -0.0413619 0.00729324 0 ); } w10 { type lineUniform; axis distance; nPoints 300; start ( -0.0281908 0.0102606 0 ); end ( -0.0394671 0.0143648 0 ); } } );
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
July 15, 2021, 16:21 |
|
#3 |
New Member
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5 |
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? |
|
July 17, 2021, 11:28 |
|
#4 |
New Member
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5 |
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 Last edited by cfdcheckers; July 18, 2021 at 21:28. Reason: Update |
|
Tags |
curved surface, cylinder, functionobject, sampling, sampling data |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 14:06 |
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? | EternalSeekerX | SU2 | 3 | October 9, 2020 19:28 |
[swak4Foam] swakExpression not writing to log | alexfells | OpenFOAM Community Contributions | 3 | March 16, 2020 19:19 |
[Other] dynamicTopoFVMesh and pointDisplacement | RandomUser | OpenFOAM Meshing & Mesh Conversion | 6 | April 26, 2018 08:30 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 15:37 |