|
[Sponsors] |
October 9, 2015, 06:54 |
Calculating with scalarAverageField
|
#1 |
Member
Join Date: May 2015
Posts: 68
Rep Power: 11 |
Hello all,
I got two scalarAverageFields k and Epsilon, I want to have a new field of the same type calculated from those by the function Omega = Epsilon/(0.09*k) it only has to do this calculation one time before starting the Simulation because those are the boundaryData files for using timeVaryingMappedFixedValue as BC. I could always Export them to Matlab/Excel, do the calculation and insert them back into a file but I hope there is a possibility to do this in OpenFoam/C++. Any help or advice where to start is appreciated! Epsilon-file Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class scalarAverageField; object values; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Average 0.0 // Data on points 328 ( //miny 1.14E-001 1.14E-001 1.06E-002 2.70E-002 2.56E-002 2.06E-002 1.50E-002 1.01E-002 6.75E-003 5.57E-003 4.11E-003 2.73E-003 2.67E-003 2.16E-003 1.86E-003 1.85E-003 1.19E-003 1.24E-003 1.51E-003 1.36E-003 1.18E-003 1.17E-003 9.51E-004 6.63E-004 9.57E-004 8.77E-004 8.87E-004 1.12E-003 5.83E-004 3.01E-004 8.07E-004 7.01E-004 5.24E-004 7.31E-004 6.16E-004 4.04E-004 2.49E-004 3.72E-004 6.96E-004 7.22E-004 3.48E-004 2.30E-004 5.09E-004 5.42E-004 2.67E-004 3.36E-004 4.33E-004 2.12E-004 2.47E-004 2.95E-004 3.52E-004 4.31E-004 2.69E-004 1.78E-004 2.26E-004 3.20E-004 1.68E-004 8.58E-005 2.50E-004 1.63E-004 1.13E-004 1.53E-004 1.94E-004 1.85E-004 1.06E-004 1.35E-004 2.10E-004 1.32E-004 1.03E-004 9.30E-005 9.54E-005 9.78E-005 9.42E-005 7.62E-005 5.83E-005 5.97E-005 3.09E-005 5.76E-005 2.82E-005 2.86E-005 2.91E-005 2.77E-005 4.55E-005 6.33E-005 3.43E-005 4.67E-005 2.36E-005 3.47E-005 7.31E-005 7.28E-005 4.88E-005 3.79E-005 7.54E-005 1.50E-004 5.24E-005 2.60E-005 2.02E-004 1.74E-004 1.14E-004 1.47E-004 2.17E-004 9.03E-005 1.40E-004 1.90E-004 2.00E-004 3.51E-004 3.04E-004 2.08E-004 1.82E-004 2.27E-004 3.37E-004 4.57E-004 1.56E-004 1.58E-004 3.49E-004 3.02E-004 2.47E-004 3.86E-004 3.92E-004 4.05E-004 3.59E-004 2.78E-004 5.94E-004 4.39E-004 4.99E-004 4.85E-004 5.43E-004 6.23E-004 3.86E-004 4.43E-004 5.60E-004 8.17E-004 1.02E-003 1.05E-003 5.34E-004 3.59E-004 6.38E-004 1.14E-003 9.86E-004 9.33E-004 8.92E-004 1.12E-003 1.70E-003 8.58E-004 9.43E-004 1.54E-003 1.45E-003 1.45E-003 1.47E-003 2.35E-003 2.44E-003 2.94E-003 3.09E-003 3.79E-003 7.38E-003 8.63E-003 7.60E-003 1.18E-002 2.65E-002 3.53E-002 2.74E-002 5.59E-003 3.74E-002 3.74E-002 // maxy 1.14E-001 1.14E-001 1.06E-002 2.70E-002 2.56E-002 2.06E-002 1.50E-002 1.01E-002 6.75E-003 5.57E-003 4.11E-003 2.73E-003 2.67E-003 2.16E-003 1.86E-003 1.85E-003 1.19E-003 1.24E-003 1.51E-003 1.36E-003 1.18E-003 1.17E-003 9.51E-004 6.63E-004 9.57E-004 8.77E-004 8.87E-004 1.12E-003 5.83E-004 3.01E-004 8.07E-004 7.01E-004 5.24E-004 7.31E-004 6.16E-004 4.04E-004 2.49E-004 3.72E-004 6.96E-004 7.22E-004 3.48E-004 2.30E-004 5.09E-004 5.42E-004 2.67E-004 3.36E-004 4.33E-004 2.12E-004 2.47E-004 2.95E-004 3.52E-004 4.31E-004 2.69E-004 1.78E-004 2.26E-004 3.20E-004 1.68E-004 8.58E-005 2.50E-004 1.63E-004 1.13E-004 1.53E-004 1.94E-004 1.85E-004 1.06E-004 1.35E-004 2.10E-004 1.32E-004 1.03E-004 9.30E-005 9.54E-005 9.78E-005 9.42E-005 7.62E-005 5.83E-005 5.97E-005 3.09E-005 5.76E-005 2.82E-005 2.86E-005 2.91E-005 2.77E-005 4.55E-005 6.33E-005 3.43E-005 4.67E-005 2.36E-005 3.47E-005 7.31E-005 7.28E-005 4.88E-005 3.79E-005 7.54E-005 1.50E-004 5.24E-005 2.60E-005 2.02E-004 1.74E-004 1.14E-004 1.47E-004 2.17E-004 9.03E-005 1.40E-004 1.90E-004 2.00E-004 3.51E-004 3.04E-004 2.08E-004 1.82E-004 2.27E-004 3.37E-004 4.57E-004 1.56E-004 1.58E-004 3.49E-004 3.02E-004 2.47E-004 3.86E-004 3.92E-004 4.05E-004 3.59E-004 2.78E-004 5.94E-004 4.39E-004 4.99E-004 4.85E-004 5.43E-004 6.23E-004 3.86E-004 4.43E-004 5.60E-004 8.17E-004 1.02E-003 1.05E-003 5.34E-004 3.59E-004 6.38E-004 1.14E-003 9.86E-004 9.33E-004 8.92E-004 1.12E-003 1.70E-003 8.58E-004 9.43E-004 1.54E-003 1.45E-003 1.45E-003 1.47E-003 2.35E-003 2.44E-003 2.94E-003 3.09E-003 3.79E-003 7.38E-003 8.63E-003 7.60E-003 1.18E-002 2.65E-002 3.53E-002 2.74E-002 5.59E-003 3.74E-002 3.74E-002 ) // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class scalarAverageField; object values; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Average 0.0 // Data on points 328 ( //miny 3.17E-002 3.17E-002 4.75E-003 8.64E-003 1.09E-002 1.26E-002 1.21E-002 1.13E-002 1.08E-002 1.02E-002 9.79E-003 9.09E-003 8.91E-003 8.65E-003 8.60E-003 8.11E-003 7.95E-003 7.62E-003 7.54E-003 7.53E-003 7.02E-003 7.19E-003 6.91E-003 6.90E-003 6.65E-003 6.38E-003 6.45E-003 6.23E-003 6.07E-003 6.01E-003 5.87E-003 5.60E-003 5.46E-003 5.54E-003 5.48E-003 5.39E-003 5.18E-003 5.17E-003 5.06E-003 4.81E-003 4.83E-003 4.78E-003 4.52E-003 4.52E-003 4.46E-003 4.48E-003 4.33E-003 4.23E-003 4.11E-003 4.10E-003 4.03E-003 3.83E-003 3.74E-003 3.71E-003 3.62E-003 3.66E-003 3.51E-003 3.58E-003 3.33E-003 3.26E-003 3.15E-003 3.19E-003 3.10E-003 2.96E-003 2.95E-003 2.81E-003 2.81E-003 2.63E-003 2.75E-003 2.58E-003 2.71E-003 2.61E-003 2.51E-003 2.52E-003 2.43E-003 2.39E-003 2.47E-003 2.40E-003 2.35E-003 2.36E-003 2.33E-003 2.31E-003 2.38E-003 2.32E-003 2.29E-003 2.33E-003 2.36E-003 2.31E-003 2.44E-003 2.43E-003 2.44E-003 2.53E-003 2.51E-003 2.50E-003 2.62E-003 2.60E-003 2.70E-003 2.91E-003 2.85E-003 2.93E-003 2.89E-003 3.01E-003 3.12E-003 3.17E-003 3.34E-003 3.34E-003 3.38E-003 3.47E-003 3.65E-003 3.79E-003 3.75E-003 3.81E-003 3.91E-003 3.94E-003 3.88E-003 4.03E-003 4.12E-003 4.29E-003 4.36E-003 4.50E-003 4.49E-003 4.63E-003 4.95E-003 4.88E-003 4.75E-003 4.85E-003 4.94E-003 5.19E-003 5.14E-003 5.53E-003 5.60E-003 5.45E-003 5.68E-003 5.86E-003 5.94E-003 5.99E-003 6.07E-003 6.34E-003 6.57E-003 6.66E-003 6.61E-003 6.81E-003 7.08E-003 7.15E-003 7.26E-003 7.35E-003 7.43E-003 7.66E-003 8.18E-003 8.25E-003 8.56E-003 8.91E-003 9.37E-003 9.72E-003 1.07E-002 1.07E-002 1.12E-002 1.14E-002 1.15E-002 1.08E-002 7.63E-003 3.59E-003 2.39E-002 2.39E-002 //maxy 3.17E-002 3.17E-002 4.75E-003 8.64E-003 1.09E-002 1.26E-002 1.21E-002 1.13E-002 1.08E-002 1.02E-002 9.79E-003 9.09E-003 8.91E-003 8.65E-003 8.60E-003 8.11E-003 7.95E-003 7.62E-003 7.54E-003 7.53E-003 7.02E-003 7.19E-003 6.91E-003 6.90E-003 6.65E-003 6.38E-003 6.45E-003 6.23E-003 6.07E-003 6.01E-003 5.87E-003 5.60E-003 5.46E-003 5.54E-003 5.48E-003 5.39E-003 5.18E-003 5.17E-003 5.06E-003 4.81E-003 4.83E-003 4.78E-003 4.52E-003 4.52E-003 4.46E-003 4.48E-003 4.33E-003 4.23E-003 4.11E-003 4.10E-003 4.03E-003 3.83E-003 3.74E-003 3.71E-003 3.62E-003 3.66E-003 3.51E-003 3.58E-003 3.33E-003 3.26E-003 3.15E-003 3.19E-003 3.10E-003 2.96E-003 2.95E-003 2.81E-003 2.81E-003 2.63E-003 2.75E-003 2.58E-003 2.71E-003 2.61E-003 2.51E-003 2.52E-003 2.43E-003 2.39E-003 2.47E-003 2.40E-003 2.35E-003 2.36E-003 2.33E-003 2.31E-003 2.38E-003 2.32E-003 2.29E-003 2.33E-003 2.36E-003 2.31E-003 2.44E-003 2.43E-003 2.44E-003 2.53E-003 2.51E-003 2.50E-003 2.62E-003 2.60E-003 2.70E-003 2.91E-003 2.85E-003 2.93E-003 2.89E-003 3.01E-003 3.12E-003 3.17E-003 3.34E-003 3.34E-003 3.38E-003 3.47E-003 3.65E-003 3.79E-003 3.75E-003 3.81E-003 3.91E-003 3.94E-003 3.88E-003 4.03E-003 4.12E-003 4.29E-003 4.36E-003 4.50E-003 4.49E-003 4.63E-003 4.95E-003 4.88E-003 4.75E-003 4.85E-003 4.94E-003 5.19E-003 5.14E-003 5.53E-003 5.60E-003 5.45E-003 5.68E-003 5.86E-003 5.94E-003 5.99E-003 6.07E-003 6.34E-003 6.57E-003 6.66E-003 6.61E-003 6.81E-003 7.08E-003 7.15E-003 7.26E-003 7.35E-003 7.43E-003 7.66E-003 8.18E-003 8.25E-003 8.56E-003 8.91E-003 9.37E-003 9.72E-003 1.07E-002 1.07E-002 1.12E-002 1.14E-002 1.15E-002 1.08E-002 7.63E-003 3.59E-003 2.39E-002 2.39E-002 ) // ************************************************************************* // |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Questions on dynamicTopoFvMesh | danvica | OpenFOAM Running, Solving & CFD | 80 | April 16, 2019 17:58 |
DPMFoam - Serious Error --particle-laden flow in simple geometric config | benz25 | OpenFOAM Running, Solving & CFD | 27 | December 19, 2017 21:47 |
[OpenFOAM] Take derivative of mean velocity in paraFoam | hiuluom | ParaView | 13 | April 26, 2016 07:44 |
Problems in calculating the fluid traction on the current structure frame in 3D models | fw407 | OpenFOAM Running, Solving & CFD | 0 | August 6, 2008 13:04 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |