-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11323 from KratosMultiphysics/dem/bonded_particle…
…_model [DEMApplication] Fixed some bugs and added a smooth-joint model
- Loading branch information
Showing
45 changed files
with
20,185 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
applications/DEMApplication/custom_constitutive/DEM_D_void_CL.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
///////////////////////////////////////////////// | ||
// Author: Chengshun Shang (CIMNE) | ||
// Email: [email protected], [email protected] | ||
// Date: June 2023 | ||
///////////////////////////////////////////////// | ||
|
||
#include "DEM_D_void_CL.h" | ||
#include "custom_elements/spheric_particle.h" | ||
|
||
namespace Kratos { | ||
|
||
DEMDiscontinuumConstitutiveLaw::Pointer DEM_D_void::Clone() const { | ||
DEMDiscontinuumConstitutiveLaw::Pointer p_clone(new DEM_D_void(*this)); | ||
return p_clone; | ||
} | ||
|
||
std::unique_ptr<DEMDiscontinuumConstitutiveLaw> DEM_D_void::CloneUnique() { | ||
return Kratos::make_unique<DEM_D_void>(); | ||
} | ||
|
||
std::string DEM_D_void::GetTypeOfLaw() { | ||
std::string type_of_law = "Void"; | ||
return type_of_law; | ||
} | ||
|
||
void DEM_D_void::Check(Properties::Pointer pProp) const {} | ||
|
||
///////////////////////// | ||
// DEM-DEM INTERACTION // | ||
///////////////////////// | ||
|
||
void DEM_D_void::CalculateForces(const ProcessInfo& r_process_info, | ||
const double OldLocalElasticContactForce[3], | ||
double LocalElasticContactForce[3], | ||
double LocalDeltDisp[3], | ||
double LocalRelVel[3], | ||
double indentation, | ||
double previous_indentation, | ||
double ViscoDampingLocalContactForce[3], | ||
double& cohesive_force, | ||
SphericParticle* element1, | ||
SphericParticle* element2, | ||
bool& sliding, double LocalCoordSystem[3][3]) { | ||
KRATOS_TRY | ||
LocalElasticContactForce[0] = 0.0; | ||
LocalElasticContactForce[1] = 0.0; | ||
LocalElasticContactForce[2] = 0.0; | ||
ViscoDampingLocalContactForce[0] = 0.0; | ||
ViscoDampingLocalContactForce[1] = 0.0; | ||
ViscoDampingLocalContactForce[2] = 0.0; | ||
KRATOS_CATCH("") | ||
} | ||
|
||
///////////////////////// | ||
// DEM-FEM INTERACTION // | ||
///////////////////////// | ||
|
||
void DEM_D_void::CalculateForcesWithFEM(const ProcessInfo& r_process_info, | ||
const double OldLocalElasticContactForce[3], | ||
double LocalElasticContactForce[3], | ||
double LocalDeltDisp[3], | ||
double LocalRelVel[3], | ||
double indentation, | ||
double previous_indentation, | ||
double ViscoDampingLocalContactForce[3], | ||
double& cohesive_force, | ||
SphericParticle* const element, | ||
Condition* const wall, | ||
bool& sliding) { | ||
KRATOS_TRY | ||
LocalElasticContactForce[0] = 0.0; | ||
LocalElasticContactForce[1] = 0.0; | ||
LocalElasticContactForce[2] = 0.0; | ||
ViscoDampingLocalContactForce[0] = 0.0; | ||
ViscoDampingLocalContactForce[1] = 0.0; | ||
ViscoDampingLocalContactForce[2] = 0.0; | ||
KRATOS_CATCH("") | ||
} | ||
|
||
} // namespace Kratos |
79 changes: 79 additions & 0 deletions
79
applications/DEMApplication/custom_constitutive/DEM_D_void_CL.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
///////////////////////////////////////////////// | ||
// Author: Chengshun Shang (CIMNE) | ||
// Email: [email protected], [email protected] | ||
// Date: June 2023 | ||
///////////////////////////////////////////////// | ||
|
||
#if !defined(DEM_D_VOID_CL_H_INCLUDED) | ||
#define DEM_D_VOID_CL_H_INCLUDED | ||
|
||
#include <string> | ||
#include <iostream> | ||
#include "DEM_discontinuum_constitutive_law.h" | ||
|
||
namespace Kratos { | ||
|
||
class SphericParticle; | ||
|
||
class KRATOS_API(DEM_APPLICATION) DEM_D_void : public DEMDiscontinuumConstitutiveLaw { | ||
|
||
public: | ||
|
||
KRATOS_CLASS_POINTER_DEFINITION(DEM_D_void); | ||
|
||
DEM_D_void() {} | ||
|
||
~DEM_D_void() {} | ||
|
||
std::string GetTypeOfLaw() override; | ||
|
||
void Check(Properties::Pointer pProp) const override; | ||
|
||
DEMDiscontinuumConstitutiveLaw::Pointer Clone() const override; | ||
|
||
std::unique_ptr<DEMDiscontinuumConstitutiveLaw> CloneUnique() override; | ||
|
||
void CalculateForces(const ProcessInfo& r_process_info, | ||
const double OldLocalElasticContactForce[3], | ||
double LocalElasticContactForce[3], | ||
double LocalDeltDisp[3], | ||
double LocalRelVel[3], | ||
double indentation, | ||
double previous_indentation, | ||
double ViscoDampingLocalContactForce[3], | ||
double& cohesive_force, | ||
SphericParticle* element1, | ||
SphericParticle* element2, | ||
bool& sliding, double LocalCoordSystem[3][3]) override; | ||
|
||
void CalculateForcesWithFEM(const ProcessInfo& r_process_info, | ||
const double OldLocalElasticContactForce[3], | ||
double LocalElasticContactForce[3], | ||
double LocalDeltDisp[3], | ||
double LocalRelVel[3], | ||
double indentation, | ||
double previous_indentation, | ||
double ViscoDampingLocalContactForce[3], | ||
double& cohesive_force, | ||
SphericParticle* const element, | ||
Condition* const wall, | ||
bool& sliding) override; | ||
|
||
private: | ||
|
||
friend class Serializer; | ||
|
||
virtual void save(Serializer& rSerializer) const override { | ||
KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, DEMDiscontinuumConstitutiveLaw) | ||
//rSerializer.save("MyMemberName",myMember); | ||
} | ||
|
||
virtual void load(Serializer& rSerializer) override { | ||
KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, DEMDiscontinuumConstitutiveLaw) | ||
//rSerializer.load("MyMemberName",myMember); | ||
} | ||
|
||
}; //class DEM_D_void | ||
|
||
} /* namespace Kratos.*/ | ||
#endif /* DEM_D_VOID_CL_H_INCLUDED defined */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.