Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulation of flexible fibers. #276

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4344ef7
Added compression example.
Mar 15, 2018
1b213ec
Modified some parameters and post-processing.
Mar 21, 2018
59298c1
Sightly simplified compression example for now.
Jul 4, 2018
8a9f97e
Merge branch 'master' of https://github.com/pypr/pysph
Jul 4, 2018
e4ff6f1
Added some postprocessing to compression example.
Oct 8, 2018
8bf358a
Introduced ellipsoid example.
Oct 8, 2018
c321cc1
Temporarily disabled some rotational degrees of freedom.
Oct 8, 2018
fa6768c
Merge branch 'master' of https://github.com/pypr/pysph
Oct 8, 2018
7cae1f2
Re-enabled locked degrees of freedom.
Oct 9, 2018
254b4fc
If no body force is used, fx, fy,fz should be initiated.
Oct 9, 2018
b038be0
Set default to higher resolution.
Oct 9, 2018
00f43dd
Ran linter and fixed code style.
Oct 9, 2018
311ca39
Ensure Python 2 compatibility.
Mar 27, 2019
4766104
Changed resolution in example.
Mar 28, 2019
c5dce8d
Merge remote-tracking branch 'upstream/master'
Apr 30, 2020
1118468
Merge branch 'master' of https://github.com/pypr/pysph
Jun 24, 2020
6ccc4a8
Merge branch 'master' of https://github.com/pypr/pysph
Jul 22, 2020
e15cb06
Fibers (#1)
meyer-nils Jul 22, 2020
74c8dca
Fixed incorrect merge of adaptive timestepping.
Jul 23, 2020
73de3e3
Fix for backward compatability.
Jul 23, 2020
bdbd6da
Remove additional examples.
Jul 28, 2020
4d1465e
Removed wall forces.
Jul 28, 2020
0508643
PEP-8 fixes.
Jul 28, 2020
0f9474d
Handle exception, if scipy is not present.
Jul 28, 2020
741ca74
Fixed a weird replacement error.
Jul 28, 2020
4b951e3
Removed a file that should not have been tracked.
Jul 28, 2020
454438b
Removed another file that should not be tracked.
Jul 28, 2020
37af396
Fixed remaining PEP-8 issues.
Jul 28, 2020
195deea
Reduce number of changes.
Jul 28, 2020
22ced36
Replace math.pi with numpy.pi as M_PI.
Jul 28, 2020
6678052
Replaced another pi with M_PI.
Jul 28, 2020
f8ba349
Reduce diffs.
Jul 28, 2020
7ad4d87
Small fix to make PEP 8 happy.
Jul 28, 2020
11d72a9
Fix for GPUDomainManager.
Jul 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ basic examples. Some of the formulations available are:
pp. 124--149)
- `Akinci <http://doi.acm.org/10.1145/2185520.2185558>`_ (Akinci et al. ACM
Trans. Graph., 2012, pp. 62:1--62:8)
- `Direct Fiber Simulation <https://doi.org/10.3390/jcs4020077>`_ for
fiber suspensions (Meyer et al. 2020, JCS, 4(2), pp. 77)

Boundary conditions from the following papers are implemented:

Expand Down
6 changes: 4 additions & 2 deletions pysph/base/gpu_domain_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
class GPUDomainManager(DomainManagerBase):
def __init__(self, xmin=-1000., xmax=1000., ymin=0.,
ymax=0., zmin=0., zmax=0.,
periodic_in_x=False, periodic_in_y=False,
periodic_in_z=False, n_layers=2.0, backend=None, props=None,
periodic_in_x=False, periodic_in_y=False, periodic_in_z=False,
gamma_yx=0.0, gamma_zx=0.0, gamma_zy=0.0,
n_layers=2.0, backend=None, props=None,
dt=0.0, calls_per_step=2,
mirror_in_x=False, mirror_in_y=False, mirror_in_z=False):
"""Constructor"""
DomainManagerBase.__init__(self, xmin=xmin, xmax=xmax,
Expand Down
16 changes: 15 additions & 1 deletion pysph/base/nnps_base.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ cpdef UIntArray arange_uint(int start, int stop=*)

# Basic particle array wrapper used for NNPS
cdef class NNPSParticleArrayWrapper:
cdef public DoubleArray x,y,z,h
cdef public DoubleArray x,y,z,u,v,w,h
cdef public UIntArray gid
cdef public IntArray tag
cdef public ParticleArray pa
Expand All @@ -164,6 +164,10 @@ cdef class DomainManagerBase:
cdef public double ytranslate
cdef public double ztranslate

cdef public double gamma_yx
cdef public double gamma_zx
cdef public double gamma_zy

cdef public int dim
cdef public bint periodic_in_x, periodic_in_y, periodic_in_z
cdef public bint is_periodic
Expand All @@ -180,8 +184,14 @@ cdef class DomainManagerBase:
cdef public double radius_scale # Radius scale for kernel
cdef public double n_layers # Number of layers of ghost particles

cdef public double t # Time for Lees-Edwards BC
cdef public double dt # Time step for Lees-Edwards BC
cdef public int calls_per_step # Number of calls per step
cdef public int loops # loop counter

#cdef double dbl_max # Maximum value of double


# remove ghost particles from a previous iteration
cpdef _remove_ghosts(self)

Expand All @@ -199,6 +209,10 @@ cdef class CPUDomainManager(DomainManagerBase):
# Convenience function to add a value to a carray
cdef _add_to_array(self, DoubleArray arr, double disp, int start=*)

# Functions to shift ghost particle periodically in a direction
cdef _shift_periodic(self, DoubleArray arr, double disp, double min_pos,
double max_pos, int start=*)

# Convenience function to multiply a value to a carray
cdef _mul_to_array(self, DoubleArray arr, double val)

Expand Down
Loading