|
[Sponsors] |
Coded FunctionObject to calculate distance to axis? Nothing written |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 22, 2018, 19:23 |
Coded FunctionObject to calculate distance to axis? Nothing written
|
#1 |
Senior Member
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17 |
Hi all,
Using OF-v1612+: For an axi-symmetric simulation, I want to calculate the distance from every cell to the axis of rotation. After that, I want to generate an iso-surface of radius equal to 50 centimeters, and over that isosurface, then I could have the velocity field that is what I want lastly (using sampling). The piece of code to calculate the cell coordinates would be something like this but nothing is written: functions { radius { type coded; functionObjectLibs ("libutilityFunctionObjects.so"); name radius; writeControl writeTime; redirectType radius; codeExecute #{ // Lookup U const volVectorField& C = mesh().C(); //const volScalarField zcoord = mesh.C().component(vector::Z); //const volScalarField ycoord = mesh.C().component(vector::Y); //volScalarField ycoord = ; //zcoord = mesh.C().component(vector::Z); //const volScalarField& radius = ((y**2+z**2)**0.5); // Write C.write(); Info<< endl << "hello test"<<endl; #}; } Any suggestion would be great. Best Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unsteady Boundary Profile with data file | Arianna | FLUENT | 34 | July 29, 2019 17:35 |
Compute/Extract cell wall distance | Ionut G | Fluent UDF and Scheme Programming | 0 | March 23, 2017 08:05 |
calculate distance from wall to neighbourig cell centroid | rr123 | Fluent UDF and Scheme Programming | 39 | March 14, 2017 02:41 |
Tecplot 'cannot calculate axis range' | SeungWon, Jeon | Tecplot | 1 | July 15, 2008 00:39 |
Can Tecplot calculate isosurface area alon axis x? | leaf | Tecplot | 0 | May 21, 2007 13:20 |