|
#include <ScaleCoupling.h>
Classes | |
struct | CoupledElement |
Stores properties of a coupled element: pointer to the element and list of particles coupled to it. More... | |
struct | CoupledParticle |
For all particles, stores coupling properties: coupling force, pointer to coupled element and location in coupled element. More... | |
Public Member Functions | |
const std::vector< CoupledElement > & | getCoupledElements () |
get coupled element More... | |
const std::vector< CoupledParticle > & | getCoupledParticles () |
get coupled particle More... | |
void | setPenalty (double penalty) |
Sets penalty parameter. More... | |
void | setCouplingWeight (const std::function< double(double x, double y, double z)> &couplingWeight) |
Sets weight function (determines which nodes/el_pts are in coupling zone) More... | |
void | solveScaleCoupling () |
Computes nStep, the ratio of FEM and DEM time steps, then calls solveSurfaceCoupling(nStep) More... | |
Public Member Functions inherited from BaseCoupling< M, O > | |
BaseCoupling ()=default | |
void | setName (std::string name) |
std::string | getName () const |
void | removeOldFiles () const |
void | writeEneTimeStep (std::ostream &os) const override |
void | writeEneHeader (std::ostream &os) const override |
void | solveOomph () |
void | solveMercury (unsigned long nt) |
void | setCGWidth (const double &width) |
double | getCGWidth () |
bool | useCGMapping () |
CGFunctions::LucyXYZ | getCGFunction () |
Private Types | |
typedef O::ELEMENT | ELEMENT |
type of el_pt in O (e.g. RefineableQDPVDElement<3, 2>) More... | |
Private Member Functions | |
void | solveScaleCoupling (unsigned nStep) |
Solve scale-coupled problem. More... | |
void | initialiseCoupledElements () |
initialises the coupledElements vector More... | |
void | computeOneTimeStepScaleCoupling (unsigned nStep) |
What to do in each time step. More... | |
void | updateCoupledElements () |
Updates the coupledElements and coupledParticles vectors: finds which particles interact with which element. More... | |
Vector< Vector< double > > | computeProjectionMatrix (const CoupledElement &coupledElement) |
Computes projectionMatrix. More... | |
void | computeCouplingForce () |
Computes coupling force for each element and particle. More... | |
void | computeNodalCouplingForces (const CoupledElement &coupledElement, const Vector< Vector< double >> &projectionMatrix) |
Computes coupling force for each node. More... | |
void | computeExternalForces (BaseParticle *p) override |
Applies coupling force to MercuryDPM in each time step. More... | |
Private Attributes | |
std::function< double(double x, double y, double z)> | couplingWeight_ |
std::vector< CoupledElement > | coupledElements_ |
Vector of all coupled elements. More... | |
std::vector< CoupledParticle > | coupledParticles_ |
The i-th element of this vector describes the coupling properties of the i-th DPM particle. More... | |
double | penalty_ = constants::NaN |
Penalty parameter, i.e., proportionality constant between velocity difference and coupling force. More... | |
|
private |
type of el_pt in O (e.g. RefineableQDPVDElement<3, 2>)
|
inlineprivate |
Computes coupling force for each element and particle.
References ScaleCoupling< M, O >::CoupledParticle::couplingForce, BaseObject::getIndex(), logger, n, Vec3D::setComponent(), and VERBOSE.
|
inlineoverrideprivate |
Applies coupling force to MercuryDPM in each time step.
References BaseInteractable::addForce(), ScaleCoupling< M, O >::CoupledParticle::couplingForce, BaseObject::getIndex(), BaseParticle::getMass(), BaseInteractable::getPosition(), BaseParticle::isFixed(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
|
inlineprivate |
Computes coupling force for each node.
1) compute velocity difference at nodal positions
2) compute nodal coupling force, penalizing the difference in velocity
3) assign it to the coupled bulk element to be used by ELEMENT::fill_in_contribution_to_residuals(...)
References ScaleCoupling< M, O >::CoupledElement::coupledParticles, ScaleCoupling< M, O >::CoupledElement::el_pt, logger, n, and VERBOSE.
|
inlineprivate |
What to do in each time step.
|
inlineprivate |
Computes projectionMatrix.
Construct mapping with FEM basis functions
References ScaleCoupling< M, O >::CoupledElement::coupledParticles, ScaleCoupling< M, O >::CoupledElement::el_pt, BaseObject::getIndex(), BaseParticle::getVolume(), and n.
|
inline |
|
inline |
get coupled particle
Referenced by ScaleCoupledBeam::actionsAfterSolve().
|
inlineprivate |
|
inline |
Sets weight function (determines which nodes/el_pts are in coupling zone)
Referenced by ScaleCoupledBeam::ScaleCoupledBeam().
|
inline |
Sets penalty parameter.
Referenced by ScaleCoupledBeam::ScaleCoupledBeam().
|
inline |
Computes nStep, the ratio of FEM and DEM time steps, then calls solveSurfaceCoupling(nStep)
Referenced by ScaleCoupledBeam::ScaleCoupledBeam().
|
inlineprivate |
Solve scale-coupled problem.
References logger.
|
inlineprivate |
Updates the coupledElements and coupledParticles vectors: finds which particles interact with which element.
1) Find min and max of coupled region
2) update the coupledParticles vector, and the particles vector of each coupledElement
References ScaleCoupling< M, O >::CoupledParticle::coupledElement_pt, ScaleCoupling< M, O >::CoupledElement::el_pt, constants::inf, logger, n, ScaleCoupling< M, O >::CoupledParticle::removeCoupledElement(), ScaleCoupling< M, O >::CoupledParticle::s, ScaleCoupling< M, O >::CoupledParticle::setCoupledElement(), VERBOSE, Vec3D::X, Vec3D::Y, and Vec3D::Z.
|
private |
Vector of all coupled elements.
|
private |
The i-th element of this vector describes the coupling properties of the i-th DPM particle.
|
private |
coupling weight: 0: pure FEM, 1: pure DEM, (0,1): overlap region
|
private |
Penalty parameter, i.e., proportionality constant between velocity difference and coupling force.