Two phase flow engine

Asked by Amiya Prakash Das

Hi

I am trying to run the example script drainage-2PFV-Yuan_and_Chareyre_2017.py. While compiling the source code in the cmake option i enabled Two phase flow by:

cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk -DTWOPHASEFLOW =ON

I hope i correctly followed the compilation process, if so i am still getting this error message while executing the script.

Traceback (most recent call last):
  File "/home/amiya/yade/install/bin/yade-2017-04-25.git-b9ce17a", line 182, in runScript
    execfile(script,globals())
  File "example.py", line 118, in <module>
    unsat=UnsaturatedEngine()
NameError: name 'UnsaturatedEngine' is not defined

My yade version is yade-2017-04-25.git-b9ce17a

Thanks
Amiya

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Amiya Prakash Das
Solved:
Last query:
Last reply:
Revision history for this message
Robert Caulk (rcaulk) said :
#1

Interesting, I have never used these engines, but the method you describe should work (I've used it for DFNFlow). Have you tried just defining it directly in the UnsaturatedEngine.cpp and TwoPhaseFlowEngine.cpp files?

You can add this:
#define TWOPHASEFLOW

someplace before this:
#ifdef TWOPHASEFLOW

Cheers,

Robert

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#2

Please report the cmake output for questions of this type. I think it already tells you what is wrong.
In order to define a C++ symbol the cmake flag should be
-DCMAKE_CXX_FLAGS=-DTWOPHASEFLOW

Bruno

Revision history for this message
Amiya Prakash Das (amiya0703) said :
#3

Thanks Bruno and Robert for your help.