CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Creating a tool to interpolate results (https://www.cfd-online.com/Forums/openfoam-solving/115135-creating-tool-interpolate-results.html)

Luis Batista March 24, 2013 18:47

Creating a tool to interpolate results
 
Dear Users,

I am developing a function to interpolate results between nodal results points for an incompressible, laminar, 2D flow.

I am aware that there are some built-in function inside OpenFoam to do this by sampleDict but I would need to implement a 9 node interpolation polynomial.

I can write an external subroutine to read the results and find the interpolated results, however, I has wondering if:

1- Can I add write an interpolation routine inside OpenFoam and add it to sampleDict in order that I can call it through the command-line sample.

2- In the case 1) is possible, I need to solve a small linear system for U and p. I have a couple of them programmed in Fortran and I could reprogram them in C++, however, isn't it possible to use the linear matrix solvers from OpenFoam? If so, how can this be achieved?

3- Which procedures do I have available to access the results from the solver in order that I can manipulate the results?

note: I am a beginner in OpenFoam, if you take the patience to answer, please mind that:)

Best regards,
Luis Batista

RPS April 6, 2013 01:06

Hi Luis,

I had implemented a new interpolation technique for FEM calculations for force and moments in a simulation software. Depending on how far your node sets are the error in interpolation will vary. Let me know if you are interested in it.

BR,
Raghunandan Patthar
raghunandan.patthar@gmail.com

Luis Batista April 11, 2013 08:15

Hello,

I will try to express better my needs.

I have built in FORTRAN an interpolation tool that carries out operations in the result files (p.e. Ux, Uy, pressure).

I would like to write this interpolation tool in c++ and use it as an "interporlation scheme", that I can use in other OpenFoam operations, as per example, for sampling data for plotting throught sample.

I believe this should be possible but I would like to hear from more experienced people if this is wise to do.

Regards,
Luis


All times are GMT -4. The time now is 07:44.