CFDEMcoupling version 3.6.1

j-kerbl's picture
Submitted by j-kerbl on Mon, 02/20/2017 - 14:54

Hi everyone,

version 3.6.1 is now available on github. It is a fix for the cfdemPostProc tool and the oneWayVTK dataExchangeModel.
Everything else is untouched.

Happy simulations and Cheers,
Josef

Daniel Queteschiner | Mon, 02/20/2017 - 15:41

Every time I see that function
char* AnyDataExchangeClass::wordToChar(word& inWord) const
{
return const_cast(inWord.c_str());
}

it cuts me to the quick.
This is most probably one of the ugliest and most unnecessary functions in CFDEMcoupling. In oneWayVTK.C you don't need it at all (first you cast away the const, then you assign the result to a const pointer ...). In other files it tries to fix the issue at the wrong end. Instead of casting away the const, the functions that take the char* should be changed to accept const char* instead. Results in much cleaner code and expresses the programmers intentions.

No offense!
Daniel

j-kerbl's picture

j-kerbl | Mon, 02/20/2017 - 16:01

Hi Daniel,

none taken! Actually when I pasted the code I had my doubts as well. After a discussion the decision was to make it consistent with the others (yes consistently ugly) and change it for all appearances the next time. The goal here was to make only minimal changes to get the mentioned feature up and running.
Thanks for pointing it out tough.

Cheers,
Josef

cgrohs | Mon, 02/20/2017 - 17:15

Hi Josef,

Thank you for updating! But I get a:

--> FOAM FATAL ERROR:
the solver calls for resetMomSourceField() although you use IB method where this is not needed!
, check your solver! - PANIC -
File not found!, "/home/cg/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemPostproc/cg_fillCylinder/CFD/../DEM/post/liggghts_init1000.vtk"

I guess it is related to:

dump dmp all custom/vtk 1000 post/liggghts_init*.vtk id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
ERROR: Invalid dump style (../output.cpp:598)
starting LIGGGHTS memory optimized parallel post processing
chunksize: 8 --> 8 files are processed per chunk. If you run out of memory reduce chunksize.
Working with 6 processes...
calculating chunks 1 - 1 of 1
aborting due to errors: [Errno 2] No such file or directory: 'dump.liggghts_init'

Do I have to change something in my LIGGGHTS installation for vtk?!?

Cheers,
Christian

j-kerbl's picture

j-kerbl | Tue, 02/21/2017 - 10:32

Hi Christian,

in your case you need to:
Comment line 67 in in.liggghts_init and uncomment 66

Here the vtk dump is activated, this has to do with some testing routines we are using.

Cheers,
josef