Menu

unsupported operand types

Help
openfoamer
2012-10-03
2012-12-21
  • 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.
    openfoamer

     
  • 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,
    Alexey

     

Log in to post a comment.