unsupported operand types

  • openfoamer

    openfoamer - 2012-10-03

    Hi Foamers,

    The following code works in C++, but not in PythonFlu:

    p0 = man.uniformDimensionedVectorField( … )
    mesh.C() - p0
    TypeError: unsupported operand type(s) for -: 'smart_tmp_volVectorField' and 'uniformDimensionedVectorFieldHolder'

    What I want to do: Add hydrostatic pressure to my solution for postprocessing with this formula (works in C++): ((mesh.C()-p0)&g) + p

    Thanks for your help.

  • Alexey Petrov

    Alexey Petrov - 2012-10-18

    Sorry for the long delay.

    Yes,  we recognize this limitation and ready to provide a patched pythonFlu binaries.
    Could you precise which Ubuntu and OpenFOAM versions you are using?
    If you are not an Ubuntu guy we can deliver an updated sources for you as well.

    Best regards,


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks