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$ Commented Dec 18, 2013 at 20:10
  • $\begingroup$ @WolfgangBangerth I tried asking in cfdonline openfoam subforum. is there a openfoam-user mailing list? $\endgroup$
    – fedvasu
    Commented Dec 18, 2013 at 20:12
  • $\begingroup$ I don't know. But I'm sure openfoam.org or openfoam.com know. $\endgroup$ Commented Dec 18, 2013 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$ Commented Dec 18, 2013 at 23:27
  • $\begingroup$ Aw, awesome. I had not realized this. That isn't exactly the spirit of open source... $\endgroup$ Commented Dec 19, 2013 at 13:38

1 Answer 1

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
    Commented Dec 19, 2013 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
    Commented Dec 19, 2013 at 22:47
  • $\begingroup$ I will accept after I have done it. $\endgroup$
    – fedvasu
    Commented Dec 20, 2013 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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