CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Using ODE in OpenFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/60860-using-ode-openfoam.html)

mauri_tano March 29, 2016 17:55

Problems with ODE in OpenFOAM 2.4.x?
 
Hello guys,

I am trying to implement an ODE solver for an application. For getting familiarized with the available solvers, I tried to run the Test-ODE script from $FOAM_APP/test/ODE.

I run
Code:

wmake
and it compiles fine, making the correct dependencies. However, when I tried to execute it, running for example
Code:

Test-ODE Euler
I get just line with the following error:

Code:

Segmentation Fault (`core' generated)
I have tried changing the solvers with equal results. I will very much appreciate your recommendations :rolleyes:

Thanks a lot!

Mauricio.

hk318i March 30, 2016 09:06

Try to use wclean then wmake. If it didn't work, go to src/ODE and wclean then wmake the ODE library.
This error is related to your machine and OF installation. I couldn't reproduce it.

ansab_sindhu April 6, 2022 06:05

hi,

The links mentioned in the below post are not working, can anyone share the alternative one please?

Regarding the forces class, it is not only for writing. You can use it to get the forces directly [LINK].
There is a very good example for that in OpenFOAM source in sixDoFRigidBody [LINK] library. Here is a snippet of this library;


Quote:

Originally Posted by hk318i (Post 566955)
Hello Methma,

That is a great progress, well done.
Regarding the forces class, it is not only for writing. You can use it to get the forces directly [LINK].
There is a very good example for that in OpenFOAM source in sixDoFRigidBody [LINK] library. Here is a snippet of this library;

Code:

// define a dictionary first
    dictionary forcesDict;

// add the required parameters
    forcesDict.add("type", forces::typeName);
    forcesDict.add("patches", wordList(1, ptPatch.name()));
    forcesDict.add("rhoInf", rhoInf_);
    forcesDict.add("rhoName", rhoName_);
    forcesDict.add("CofR", motion_.centreOfRotation());

// create force object
    forces f("forces", db(), forcesDict);
// calculate the forces
    f.calcForcesMoment();
// finally you can get the forces and moment
    vector F = f.forceEff();
    vector M = f.momentEff();

Best wishes,
Hassan



All times are GMT -4. The time now is 06:15.