Skip to content

Commit

Permalink
Updated the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eg0000r-pub committed Feb 24, 2024
1 parent 46f438e commit 2e2508a
Show file tree
Hide file tree
Showing 9 changed files with 409 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Writerside/hi.tree
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@
<toc-element topic="Van-der-Waals-attraction.md"/>
<toc-element topic="Frictional-contact.md"/>
</toc-element>
<toc-element topic="Unary-force-models.md">
<toc-element topic="Triangular-facet.md">
<toc-element topic="Van-der-Waals-attraction-surface.md"/>
<toc-element topic="Frictional-contact-surface.md"/>
</toc-element>
</toc-element>
</toc-element>
</instance-profile>
2 changes: 1 addition & 1 deletion Writerside/topics/Binary-force-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tldr>
<p>A record type that stores a variable number of references to binary force model
instances</p>
<p>Name: <code>binary_force_container_t</code></p>
<p>Name: <code>binary_force_container</code></p>
<p>Defined in: <code>&lt;libgran/granular_system/granular_system.h&gt;</code></p>
</tldr>

Expand Down
2 changes: 1 addition & 1 deletion Writerside/topics/Binary-force-models.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 11 additions & 2 deletions Writerside/topics/Class-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<seealso>
<category ref="related">
<a href="Overview.md">Overview</a>
Expand Down
135 changes: 135 additions & 0 deletions Writerside/topics/Frictional-contact-surface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Frictional contact (surface)

<tldr>
<p>A surface force model that simulates frictional forces between a particle and a plane in contact</p>
<p>Name: <code>surface_contact_force_functor</code></p>
<p>Defined in: <code>&lt;libgran/contact_force/surface_contact_force.h&gt;</code></p>
</tldr>

## 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<fielv_value_t> const & x`
: const reference to the position buffer

`std::vector<fielv_value_t> const & v`
: const reference to the velocity buffer

`std::vector<fielv_value_t> const & theta`
: const reference to the orientation buffer

`std::vector<fielv_value_t> const & omega`
: const reference to the angular velocity buffer

`real_t t`
: simulation time

Return value:

{type="wide"}
`std::pair<field_value_t, field_value_t>`
: translational acceleration and angular acceleration of particle i due to its
frictional contact with particle j

<seealso>
<category ref="related">
<a href="Overview.md">Overview</a>
<a href="Installation.md">Installation</a>
<a href="Tutorials.md">Tutorials</a>
<a href="Class-reference.md">Class reference</a>
</category>
<category ref="external">
<a href="https://github.com/egor-demidov/libgran">libgran on GitHub</a>
<a href="https://github.com/egor-demidov/libtimestep">libtimestep on GitHub</a>
</category>
</seealso>
140 changes: 140 additions & 0 deletions Writerside/topics/Triangular-facet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Triangular facet

<tldr>
<p>A type that stores a variable number of references to surface force models</p>
<p>Name: <code>triangular_facet</code></p>
<p>Defined in: <code>&lt;libgran/surface_force/triangular_facet.h&gt;</code></p>
</tldr>

## 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<field_value_t, field_value_t, field_value_t> 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<fielv_value_t> const & x`
: const reference to the position buffer

`std::vector<fielv_value_t> const & v`
: const reference to the velocity buffer

`std::vector<fielv_value_t> const & theta`
: const reference to the orientation buffer

`std::vector<fielv_value_t> const & omega`
: const reference to the angular velocity buffer

`real_t t`
: simulation time

Return value:

{type="wide"}
`std::pair<field_value_t, field_value_t>`
: 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<field_value_t, field_value_t, field_value_t> 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

<seealso>
<category ref="related">
<a href="Overview.md">Overview</a>
<a href="Installation.md">Installation</a>
<a href="Tutorials.md">Tutorials</a>
<a href="Class-reference.md">Class reference</a>
</category>
<category ref="external">
<a href="https://github.com/egor-demidov/libgran">libgran on GitHub</a>
<a href="https://github.com/egor-demidov/libtimestep">libtimestep on GitHub</a>
</category>
</seealso>
2 changes: 1 addition & 1 deletion Writerside/topics/Unary-force-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tldr>
<p>A record type that stores a variable number of references to unary force model
instances</p>
<p>Name: <code>unary_force_container_t</code></p>
<p>Name: <code>unary_force_container</code></p>
<p>Defined in: <code>&lt;libgran/granular_system/granular_system.h&gt;</code></p>
</tldr>

Expand Down
24 changes: 24 additions & 0 deletions Writerside/topics/Unary-force-models.md
Original file line number Diff line number Diff line change
@@ -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)

<seealso>
<category ref="related">
<a href="Overview.md">Overview</a>
<a href="Installation.md">Installation</a>
<a href="Tutorials.md">Tutorials</a>
<a href="Class-reference.md">Class reference</a>
</category>
<category ref="external">
<a href="https://github.com/egor-demidov/libgran">libgran on GitHub</a>
<a href="https://github.com/egor-demidov/libtimestep">libtimestep on GitHub</a>
</category>
</seealso>
Loading

0 comments on commit 2e2508a

Please sign in to comment.