1
$\begingroup$

So, I am running this openfoam simulation and I need areaAverage velocity and pressure on a surface,currently the entire plane is being read, I wan't to specify my own in sampleSurfaceDict,

new_plane
{
    type            faceSource;
    functionObjectLibs ("libfieldFunctionObjects.so");
    enabled         true;
    outputControl   timeStep;
    log             true;
    valueOutput     true;
    source          sampledSurface;
    //setFormat raw;
    surfaceFormat   vtk;


    sampledSurfaceDict
    {
        type            plane;    // always triangulated
        basePoint       (0   -1.5 0);
        normalVector    (0 -1 0);
    }
    operation       areaAverage;
    fields
    (
        p
        U
    );
}

is there a type circle? or a way to specify radius? in sampledSurfaceDict

sampledSurfaceDict
    {
        type            plane;    // always triangulated
        basePoint       (0   -1.5 0);
        normalVector    (0 -1 0);
    }

does anyone know about planeEquationDict?

$\endgroup$
5
  • $\begingroup$ I think this is best asked in the OpenFOAM forums or mailing lists. $\endgroup$ – Wolfgang Bangerth Dec 18 '13 at 20:10
  • $\begingroup$ @WolfgangBangerth I tried asking in cfdonline openfoam subforum. is there a openfoam-user mailing list? $\endgroup$ – fedvasu Dec 18 '13 at 20:12
  • $\begingroup$ I don't know. But I'm sure openfoam.org or openfoam.com know. $\endgroup$ – Wolfgang Bangerth Dec 18 '13 at 20:47
  • 1
    $\begingroup$ @WolfgangBangerth: OpenFOAM essentially sells support; there aren't any forums or mailing lists on their web sites, as far as I can tell, which limits sources of free support to third-party forums and providers, such as CFD Online or OPENFoam Extend. However, like here, sufficiently narrow technical questions regarding OpenFOAM may not be answered for a long time (if at all) on CFD Online because people may not have the expertise, and the documentation is left vague, ostensibly to induce people to pay for support. $\endgroup$ – Geoff Oxberry Dec 18 '13 at 23:27
  • $\begingroup$ Aw, awesome. I had not realized this. That isn't exactly the spirit of open source... $\endgroup$ – Wolfgang Bangerth Dec 19 '13 at 13:38
2
$\begingroup$

As far as I know, there is non such thing. But what you aim for should be fairly straight forward to implement, as long as you happen to have some experience with C++.

  1. Locate the circleSet in the OpenFOAM source directory.
  2. Make a local copy of it and rename it to something like faceSetSet.
  3. Read the name of the faceSet you'd like to sample on.
  4. Read the faceSet.
  5. In each timestep, loop only over those faces and average the fields you'd like.

This is a very rudimentary and basic algorithm, you'd have to fill in the gaps. If you need more help, let me know.

$\endgroup$
3
  • $\begingroup$ OK, it is more than what I expected,let us say I implemented that functionality, how do I link to existing openfoam installation so that my current set-up is undisturbed? (I am basically running a variation on pimpleDyMFoam tut) $\endgroup$ – fedvasu Dec 19 '13 at 19:35
  • 1
    $\begingroup$ Compile the above into a dynamic library, add the following code to your controlDict (change the library name, to fit your freshly compiled library): libs("mylib.so"); That just links your library to the solver during runtime. No need to recompile the solver or change the functionality of it. Does this answer you question? $\endgroup$ – jhoepken Dec 19 '13 at 22:47
  • $\begingroup$ I will accept after I have done it. $\endgroup$ – fedvasu Dec 20 '13 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.