-
Notifications
You must be signed in to change notification settings - Fork 67
Description
I'm trying to add a term representing a repulsion force at the translation velocity of the rhs vector. For this I have included two functions in the python layer for the fluid toolbox, fluid.cpp
.
The first function contactForce
computes the repulsion force and adds it to the rhs vector. And the second function linAssemblyPython
allows to call the first function during solve
.
As we use Navier-Stokes in the simulations, I implemented the same functions using residual
: contactForceRes
and ResAssemblyPython
.
In the python script used to run the simulations, fluid-remesh.py
, I thus added the line:
f.linAssemblyPython(f.contactForce)
In the linear case my program runs but I don't think that the contactForce
function is actually called: no print and I still get the same results as for the simulations without the repulsion force, no matter how great the force is.
In the non-linear case with residual
, I get the following error message:
Traceback (most recent call last):
File "fluid-remesh.py", line 201, in <module>
f.solve()
RuntimeError: make_tuple(): unable to convert arguments to Python object (compile in debug mode for details)
I tested the repulsion force computation, the implementation didn't have any problems at that level.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status