From 2e2508a9e45858c50dc4405531eba120f5a20406 Mon Sep 17 00:00:00 2001 From: egor Date: Sat, 24 Feb 2024 16:49:39 -0500 Subject: [PATCH] Updated the docs --- Writerside/hi.tree | 6 + Writerside/topics/Binary-force-container.md | 2 +- Writerside/topics/Binary-force-models.md | 2 +- Writerside/topics/Class-reference.md | 13 +- .../topics/Frictional-contact-surface.md | 135 +++++++++++++++++ Writerside/topics/Triangular-facet.md | 140 ++++++++++++++++++ Writerside/topics/Unary-force-container.md | 2 +- Writerside/topics/Unary-force-models.md | 24 +++ .../Van-der-Waals-attraction-surface.md | 90 +++++++++++ 9 files changed, 409 insertions(+), 5 deletions(-) create mode 100644 Writerside/topics/Frictional-contact-surface.md create mode 100644 Writerside/topics/Triangular-facet.md create mode 100644 Writerside/topics/Unary-force-models.md create mode 100644 Writerside/topics/Van-der-Waals-attraction-surface.md diff --git a/Writerside/hi.tree b/Writerside/hi.tree index 5bac2eb..41718c7 100644 --- a/Writerside/hi.tree +++ b/Writerside/hi.tree @@ -22,5 +22,11 @@ + + + + + + \ No newline at end of file diff --git a/Writerside/topics/Binary-force-container.md b/Writerside/topics/Binary-force-container.md index 818ba9e..069b3c2 100644 --- a/Writerside/topics/Binary-force-container.md +++ b/Writerside/topics/Binary-force-container.md @@ -3,7 +3,7 @@

A record type that stores a variable number of references to binary force model instances

-

Name: binary_force_container_t

+

Name: binary_force_container

Defined in: <libgran/granular_system/granular_system.h>

diff --git a/Writerside/topics/Binary-force-models.md b/Writerside/topics/Binary-force-models.md index e2e7075..59788db 100644 --- a/Writerside/topics/Binary-force-models.md +++ b/Writerside/topics/Binary-force-models.md @@ -1,6 +1,6 @@ # Binary force models -libran comes with some build-in binary force models. Here, we provide class fererences +libran comes with some build-in binary force models. Here, we provide class references for reach built-in binary model template: - [Van der Waals attraction](Van-der-Waals-attraction.md) - simulates Van der Waals attraction diff --git a/Writerside/topics/Class-reference.md b/Writerside/topics/Class-reference.md index d96e44c..c270665 100644 --- a/Writerside/topics/Class-reference.md +++ b/Writerside/topics/Class-reference.md @@ -12,12 +12,21 @@ arguments, and member functions of objects provided in libgran: [`unary_force_container.t`](Unary-force-container.md) : A record type that stores references to unary force model instances -[`hamaker_funcor`](Van-der-Waals-attraction.md) -: A force model that simulates Van der Waals attraction +[`hamaker_functor`](Van-der-Waals-attraction.md) +: A force model that simulates Van der Waals attraction between two particles [`contact_force_functor`](Frictional-contact.md) : A force model that simulates frictional forces between contacting particles +[`triangular_facet`](Triangular-facet.md) +: A wrapper for particle-surface force models + +[`surface_hamaker_functor`](Van-der-Waals-attraction-surface.md) +: A force model that simulates Van der Waals attraction between a particle and a surface + +[`surface_contact_force_functor`](Frictional-contact-surface.md) +: A force model that simulates frictional forces between a particle and a plane in contact + Overview diff --git a/Writerside/topics/Frictional-contact-surface.md b/Writerside/topics/Frictional-contact-surface.md new file mode 100644 index 0000000..9b493ef --- /dev/null +++ b/Writerside/topics/Frictional-contact-surface.md @@ -0,0 +1,135 @@ +# Frictional contact (surface) + + +

A surface force model that simulates frictional forces between a particle and a plane in contact

+

Name: surface_contact_force_functor

+

Defined in: <libgran/contact_force/surface_contact_force.h>

+
+ +## Template parameters + +{type="wide"} +`field_value_t` +: primary field type + +`real_t` +: scalar field type + +## Constructor arguments + +{type="wide"} +`size_t n_part` +: number of particles in the system + +`real_t k` +: normal stiffness + +`real_t gamma_n` +: normal damping coefficient + +`real_t k_t` +: tangential stiffness + +`real_t gamma_t` +: tangential damping coefficient + +`real_t mu_s` +: static friction coefficient for sticking/sliding + +`real_t phi_d` +: dynamic-to-static friction ratio for sticking/sliding + +`real_t k_r` +: rolling resistance stiffness + +`real_t gamma_r` +: rolling resistance damping coefficient + +`real_t mu_r` +: static friction coefficient for rolling resistance + +`real_t phi_r` +: dynamic-to-static friction ratio for rolling resistance + +`real_t k_o` +: torsion resistance stiffness + +`real_t gamma_o` +: torsion resistance damping coefficient + +`real_t mu_o` +: static friction coefficient for torsion resistance + +`real_t phi_o` +: dynamic-to-static friction ratio for torsion resistance + +`real_t r_part` +: particle radius + +`real_t mass` +: particle mass + +`real_t inertia` +: particle moment of inertia + +`real_t dt` +: integration time step + +`field_value_t field_zero` +: zero-valued primary field + +`real_t real_zero` +: zero-valued scalar field + +## Public member functions + +### operator () + +Synopsis: + +Called by the [triangular facet](Triangular-facet.md) to compute the acceleration +of particle i due to its frictional contact with the triangular facet + +Arguments: + +{type="wide"} +`size_t i` +: index of the particle that is being accelerated + +`field_value_t const & x_facet` +: point on the facet closest to the center of particle i + +`std::vector const & x` +: const reference to the position buffer + +`std::vector const & v` +: const reference to the velocity buffer + +`std::vector const & theta` +: const reference to the orientation buffer + +`std::vector const & omega` +: const reference to the angular velocity buffer + +`real_t t` +: simulation time + +Return value: + +{type="wide"} +`std::pair` +: translational acceleration and angular acceleration of particle i due to its +frictional contact with particle j + + + + Overview + Installation + Tutorials + Class reference + + + libgran on GitHub + libtimestep on GitHub + + diff --git a/Writerside/topics/Triangular-facet.md b/Writerside/topics/Triangular-facet.md new file mode 100644 index 0000000..2fb3a58 --- /dev/null +++ b/Writerside/topics/Triangular-facet.md @@ -0,0 +1,140 @@ +# Triangular facet + + +

A type that stores a variable number of references to surface force models

+

Name: triangular_facet

+

Defined in: <libgran/surface_force/triangular_facet.h>

+
+ +## Template parameters + +{type="wide"} +`field_value_t` +: primary field type + +`real_t` +: scalar field type + +`surface_force_functors_t ...` +: list of surface force model types + +## Constructor arguments + +{type="wide"} +`field_value_t v_facet` +: initial translational velocity of the facet + +`std::tuple vertices` +: vertices of the triangular facet + +`surface_force_functors_t & ...` +: list of surface force model references + +## Public member functions + +### operator () + +Synopsis: + +Called by the [unary force container](Unary-force-container.md) to compute the acceleration of particle i due to +surface forces exerted on it because of the triangular facet + +Arguments: + +{type="wide"} +`size_t i` +: index of the particle that is being accelerated + +`std::vector const & x` +: const reference to the position buffer + +`std::vector const & v` +: const reference to the velocity buffer + +`std::vector const & theta` +: const reference to the orientation buffer + +`std::vector const & omega` +: const reference to the angular velocity buffer + +`real_t t` +: simulation time + +Return value: + +{type="wide"} +`std::pair` +: translational acceleration and angular acceleration of particle i due to surface forces exerted on it by the + triangular facet + +### get_unit_normal() + +Synopsis: + +Returns the normal unit vector of the plane in which the triangular facet lies + +Arguments: + +{type="wide"} +`void` +: no arguments + +Return value: + +{type="wide"} +`field_value_t const &` +: const reference to the normal unit vector of the plane in which the triangular facet lies + +### get_vertices() + +Synopsis: + +Returns the tuple with current positions of the vertices of the triangular facet + +Arguments: + +{type="wide"} +`void` +: no arguments + +Return value: + +{type="wide"} +`std::tuple const &` +: const reference to the tuple containing the positions of the vertices of the triangular facet + +### update_positions() + +Synopsis: + +Needs to be called at every integration time step to update the positions of the vertices based on the +facet velocity, `v_facet`, unless the facet is static + +Arguments: + +{type="wide"} +`real_t dt` +: time step by which the vertex positions need to be advanced + +{type="wide"} +`void` +: no return value + +## Public member variables + +{type="wide"} +`field_value_t v_facet` +: current translational velocity of the triangular facet + + + + Overview + Installation + Tutorials + Class reference + + + libgran on GitHub + libtimestep on GitHub + + diff --git a/Writerside/topics/Unary-force-container.md b/Writerside/topics/Unary-force-container.md index b20c907..b7c9fb0 100644 --- a/Writerside/topics/Unary-force-container.md +++ b/Writerside/topics/Unary-force-container.md @@ -3,7 +3,7 @@

A record type that stores a variable number of references to unary force model instances

-

Name: unary_force_container_t

+

Name: unary_force_container

Defined in: <libgran/granular_system/granular_system.h>

diff --git a/Writerside/topics/Unary-force-models.md b/Writerside/topics/Unary-force-models.md new file mode 100644 index 0000000..bfa4faa --- /dev/null +++ b/Writerside/topics/Unary-force-models.md @@ -0,0 +1,24 @@ +# Unary force models + +libran comes with some build-in binary force models. Here, we provide class fererences +for reach built-in binary model template: + +- [Triangular facet](Van-der-Waals-attraction.md) - a wrapper that simulates rigid triangular facets with particle-surface interaction + forces described by surface force models: + - [Van der Waals attraction](Van-der-Waals-attraction-surface.md) - simulates Van der Waals attraction between a + particle and a plane based on [Hamaker theory](https://doi.org/10.1016/S0031-8914(37)80203-7) + - [Frictional contact](Frictional-contact-surface.md) - simulates frictional forces between a particle + and a plane in contact based on the approach described in [Luding 2008](https://doi.org/10.1007/s10035-008-0099-x) + + + + Overview + Installation + Tutorials + Class reference + + + libgran on GitHub + libtimestep on GitHub + + \ No newline at end of file diff --git a/Writerside/topics/Van-der-Waals-attraction-surface.md b/Writerside/topics/Van-der-Waals-attraction-surface.md new file mode 100644 index 0000000..f8b702e --- /dev/null +++ b/Writerside/topics/Van-der-Waals-attraction-surface.md @@ -0,0 +1,90 @@ +# Van der Waals attraction (surface) + + +

A surface force model that simulates particle-surface Van der Waals attraction

+

Name: surface_hamaker_functor

+

Defined in: <libgran/hamaker_force/surface_hamaker_force.h>

+
+ +## Template parameters + +{type="wide"} +`field_value_t` +: primary field type + +`real_t` +: scalar field type + +## Constructor arguments + +{type="wide"} +`real_t A` +: Hamaker constant of the material + +`real_t h0` +: saturation distance + +`real_t r_part` +: particle radius + +`real_t mass` +: particle mass + +`field_value_t field_zero` +: zero-valued primary field + +`real_t real_zero` +: zero-valued scalar field + +## Public member functions + +### operator () + +Synopsis: + +Called by the [triangular facet](Triangular-facet.md) to compute the acceleration +of particle i due to its Van der Waals attraction to the triangular facet + +Arguments: + +{type="wide"} +`size_t i` +: index of the particle that is being accelerated + +`field_value_t const & x_facet` +: point on the facet closest to the center of particle i + +`std::vector const & x` +: const reference to the position buffer + +`std::vector const & v` +: const reference to the velocity buffer + +`std::vector const & theta` +: const reference to the orientation buffer + +`std::vector const & omega` +: const reference to the angular velocity buffer + +`real_t t` +: simulation time + +Return value: + +{type="wide"} +`std::pair` +: translational acceleration and angular acceleration of particle i due to its +Van der Waals attraction to particle j + + + + Overview + Installation + Tutorials + Class reference + + + libgran on GitHub + libtimestep on GitHub + +