2 Commits
3.6.0 ... 3.6.1

Author SHA1 Message Date
DCS
641f6c694f new version 3.6.1 2017-02-20 14:37:12 +01:00
DCS
c9953c7afe patch and updates for cfdemPostProc src and tutorial 2017-02-20 14:11:55 +01:00
8 changed files with 70 additions and 23 deletions

View File

@ -71,14 +71,14 @@ int main(int argc, char *argv[])
int DEM_dump_Interval=1000;
particleCloud.reAllocArrays();
double **positions_;
double **velocities_;
double **radii_;
double **voidfractions_;
double **particleWeights_;
double **particleVolumes_;
double **particleV_;
double **cellIDs_;
double **positions_(NULL);
double **velocities_(NULL);
double **radii_(NULL);
double **voidfractions_(NULL);
double **particleWeights_(NULL);
double **particleVolumes_(NULL);
double **particleV_(NULL);
double **cellIDs_(NULL);
particleCloud.dataExchangeM().allocateArray(positions_,0.,3);
particleCloud.dataExchangeM().allocateArray(velocities_,0.,3);

View File

@ -33,7 +33,7 @@ Description
#ifndef versionInfo_H
#define versionInfo_H
word CFDEMversion="cfdem-3.6.0";
word CFDEMversion="cfdem-3.6.1";
word compatibleLIGGGHTSversion="3.6.0";
word OFversion="3.0.x-commit-ac3f6c67e02f0aac3777c27f9fb7558fc3536e37";

View File

@ -72,8 +72,7 @@ oneWayVTK::oneWayVTK
setNumberOfParticles(maxNumberOfParticles_);
// make a const char* from word
string HH=string(filename_);
charFilename_=HH.c_str();
charFilename_ = wordToChar(filename_);
Info << "relativePath_" << relativePath_ << endl;
}
@ -84,14 +83,18 @@ oneWayVTK::oneWayVTK
oneWayVTK::~oneWayVTK()
{}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
char* oneWayVTK::wordToChar(word& inWord) const
{
return const_cast<char*>(inWord.c_str());
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void oneWayVTK::getData
(
word name,
word type,
double ** const& field,
label step
int step
) const
{
if (type == "scalar-atom")
@ -101,13 +104,14 @@ void oneWayVTK::getData
sprintf(index, charFilename_, step);
//fileName H(particleCloud_.mesh().time().path()/".."/"DEM"/"post"/index);
fileName H(particleCloud_.mesh().time().path()/relativePath_/index);
Info << "opening file: " <<H << endl;
Info << "opening file: " << H << endl;
// set file pointer
string HH=string(H);
const char * paricleFilePath=HH.c_str();
ifstream* inputPtr;
inputPtr = new ifstream(paricleFilePath);
if(!*inputPtr) FatalError << "File not found!, " << H << "\n" << abort(FatalError);
if (name == "radius")
{
@ -142,15 +146,17 @@ void oneWayVTK::getData
// get path to particle VTK files
char index[100];
sprintf(index, charFilename_, step);
Info << "debug: index is " << index << endl; //JOKER
//fileName H(particleCloud_.mesh().time().path()/".."/"DEM"/"post"/index);
fileName H(particleCloud_.mesh().time().path()/relativePath_/index);
Info << "opening file: " <<H << endl;
Info << "opening file: " << H << endl;
// set file pointer
string HH=string(H);
const char * paricleFilePath=HH.c_str();
ifstream* inputPtr;
inputPtr = new ifstream(paricleFilePath);
if(!*inputPtr) FatalError << "File not found!, " << H << "\n" << abort(FatalError);
// read position data from VTK file
//NP: secial case as position data has no "name" in the vtk file
@ -159,7 +165,6 @@ void oneWayVTK::getData
int numberOfParticles; // remove this?
string just_read = " ";
if(!*inputPtr) cerr << "File not found!, " << H << endl;
while(just_read.compare("POINTS") != 0) *inputPtr >> just_read; //read until we read "POINTS"
*inputPtr >> numberOfParticles; //this is now the number of points in the file
*inputPtr >> just_read; // skip text for dataType

View File

@ -66,6 +66,10 @@ private:
const char* charFilename_;
// private member functions
char* wordToChar(word&) const;
public:
//- Runtime type information
@ -113,6 +117,11 @@ public:
) const;
word myType() const{return typeName; };
void setCG() const {
//no coarse graining data available, assume 1
particleCloud_.setCG(1.);
};
};

View File

@ -93,6 +93,7 @@ read
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd $casePath/CFD
cleanCase
rm -r $casePath/CFD/postProcessing
rm -r $casePath/CFD/lagrangian
rm -r $casePath/CFD/clockData
rm $casePath/CFD/octave/octave-workspace

View File

@ -82,6 +82,10 @@ typeConcentrationProps
);
}
noDragProps
{
}
oneWayVTKProps
{
DEMts 0.0001;

View File

@ -50,3 +50,30 @@ adjustTimeStep no;
maxCo 0.1;
// ************************************************************************* //
functions
(
probes
{
type probes;
// Where to load it from
functionObjectLibs ( "libsampling.so" );
// Name of the directory for probe data
name probes;
probeLocations
(
(0.00003 0 0.0001)
(0.00003 0 0.01)
(0.00003 0 0.02)
(0.00003 0 0.0529)
);
// Fields to be probed
fields ( voidfraction voidfractionNext voidfractionPrev);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
}
);

View File

@ -42,13 +42,13 @@ fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcyli
#particle insertion
region bc cylinder z 0.0 0.0 0.012 0.02 0.03 units box
region bc2 cylinder z 0.0 0.0 0.012 0.01 0.02 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 200 radius constant 0.001
fix pts2 all particletemplate/sphere 1 atom_type 2 density constant 200 radius constant 0.001
fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
fix pdd2 all particledistribution/discrete 1. 1 pts2 1.0
fix pts1 all particletemplate/sphere 49979687 atom_type 1 density constant 200 radius constant 0.001
fix pts2 all particletemplate/sphere 49979693 atom_type 2 density constant 200 radius constant 0.001
fix pdd1 all particledistribution/discrete 15485863 1 pts1 1.0
fix pdd2 all particledistribution/discrete 15485867 1 pts2 1.0
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc
fix ins2 all insert/pack seed 100001 distributiontemplate pdd2 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc2
fix ins all insert/pack seed 32452843 distributiontemplate pdd1 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc
fix ins2 all insert/pack seed 32452867 distributiontemplate pdd2 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc2
#apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
@ -63,7 +63,8 @@ compute_modify thermo_temp dynamic yes
#insert the first particles so that dump is not empty
run 1
dump dmp all custom 1000 post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#dump dmp all custom 1000 post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
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
run 3000 upto
#write_restart liggghts.restart