API Reference¶
Orientation Models¶
ard_rsc_ode(a, A, D, W, xi, b1=0.0, kappa=1.0, b2=0, b3=0, b4=0, b5=0, **kwargs)
¶
ODE describing ARD-RSC model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
b1
|
float
|
First parameter of rotary diffusion tensor (0 < b1 < 0.1). |
0.0
|
kappa
|
float
|
Strain reduction factor (0 < kappa < 1). |
1.0
|
b2
|
type
|
Second parameter of rotary diffusion tensor. |
0
|
b3
|
type
|
Third parameter of rotary diffusion tensor. |
0
|
b4
|
type
|
Fourth parameter of rotary diffusion tensor. |
0
|
b5
|
type
|
Fith parameter of rotary diffusion tensor. |
0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] J. H. Phelps, C. L. Tucker, 'An anisotropic rotary diffusion model for fiber orientation in short- and long-fiber thermoplastics', Journal of Non-Newtonian Fluid Mechanics 156, 165-176, 2009. https://doi.org/10.1016/j.jnnfm.2008.08.002
folgar_tucker_ode(a, A, D, W, xi, Ci=0.0, **kwargs)
¶
ODE describing the Folgar-Tucker model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.1). |
0.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] F. Folgar, C.L. Tucker III, 'Orientation behavior of fibers in concentrated suspensions', Journal of Reinforced Plastic Composites 3, 98-119, 1984. https://doi.org/10.1177%2F073168448400300201
iard_ode(a, A, D, W, xi, Ci=0.0, Cm=0.0, **kwargs)
¶
ODE describing iARD model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.1). |
0.0
|
Cm
|
float
|
Anisotropy factor (0 < Cm < 1). |
0.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] Tseng, Huan-Chang; Chang, Rong-Yeu; Hsu, Chia-Hsiang, 'An objective tensor to predict anisotropic fiber orientation in concentrated suspensions', Journal of Rheology 60, 215, 2016. https://doi.org/10.1122/1.4939098
iardrpr_ode(a, A, D, W, xi, Ci=0.0, Cm=0.0, alpha=0.0, beta=0.0, **kwargs)
¶
ODE describing iARD-RPR model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.1). |
0.0
|
Cm
|
float
|
Anisotropy factor (0 < Cm < 1). |
0.0
|
alpha
|
float
|
Retardance rate (0 < alpha < 1). |
0.0
|
beta
|
float
|
Retardance tuning factor (0 < beta < 1). |
0.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] Tseng, Huan-Chang; Chang, Rong-Yeu; Hsu, Chia-Hsiang, 'An objective tensor to predict anisotropic fiber orientation in concentrated suspensions', Journal of Rheology 60, 215, 2016. https://doi.org/10.1122/1.4939098
integrate_ori_ode(t, a_flat, L, closure, ori_model, kwargs)
¶
Compute the orientation tensor rate for scipy ODE solvers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
float
|
Time of evaluation. |
required |
a_flat
|
9x1 numpy array
|
Flattened second-order fiber orientation tensor. |
required |
L
|
function handle
|
Function |
required |
closure
|
Function |
required | |
ori_model
|
Function |
required | |
kwargs
|
dict
|
Keyword arguments for function |
required |
Returns:
| Type | Description |
|---|---|
9x1 numpy array
|
Orientation tensor rate. |
jeffery_ode(a, A, D, W, xi, **kwargs)
¶
ODE describing Jeffery's model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] G.B. Jeffery 'The motion of ellipsoidal particles immersed in a viscous fluid', Proceedings of the Royal Society A, 1922. https://doi.org/10.1098/rspa.1922.0078
maier_saupe_ode(a, A, D, W, xi, Ci=0.0, U0=0.0, **kwargs)
¶
ODE using Folgar-Tucker constant and Maier-Saupe potential.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.1). |
0.0
|
U0
|
float
|
Maier-Saupe Potential (in 3D stable for y U0 < 8 Ci). |
0.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] Arnulf Latz, Uldis Strautins, Dariusz Niedziela, 'Comparative numerical study of two concentrated fiber suspension models', Journal of Non-Newtonian Fluid Mechanics 165, 764-781, 2010. https://doi.org/10.1016/j.jnnfm.2010.04.001
mori_tanaka_ode(a, A, D, W, xi, c_f=0.0, **kwargs)
¶
ODE describing the modified Jeffery equation based on the Mori-Tanaka model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
c_f
|
float
|
Fiber volume fraction. |
0.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] T. Karl, T. Böhlke, 'Generalized Micromechanical Formulation of Fiber Orientation Tensor Evolution Equations', International Journal of Mechanical Sciences 2023. https://doi.org/10.1016/j.ijmecsci.2023.108771
mrd_ode(a, A, D, W, xi, Ci=0.0, D1=1.0, D2=0.8, D3=0.15, **kwargs)
¶
ODE describing MRD model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.1). |
0.0
|
D1
|
type
|
Anisotropy factors (D1 > 0). |
1.0
|
D2
|
type
|
Anisotropy factors (D2 > 0). |
0.8
|
D3
|
type
|
Anisotropy factors (D3 > 0). |
0.15
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] A. Bakharev, H. Yu, R. Speight and J. Wang, 'Using New Anisotropic Rotational Diffusion Model To Improve Prediction Of Short Fibers in Thermoplastic InjectionMolding', ANTEC, Orlando, 2018.
pard_ode(a, A, D, W, xi, Ci=0.0, Omega=0.0, **kwargs)
¶
ODE describing pARD model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.05). |
0.0
|
Omega
|
type
|
Anisotropy factor (0.5 < Omega < 1). |
0.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] Tseng, Huan-Chang; Chang, Rong-Yeu; Hsu, Chia-Hsiang, 'The use of principal spatial tensor to predict anisotropic fiber orientation in concentrated fiber suspensions', Journal of Rheology 62, 313, 2017. https://doi.org/10.1122/1.4998520
pardrpr_ode(a, A, D, W, xi, Ci=0.0, Omega=0.0, alpha=0.0, **kwargs)
¶
ODE describing pARD-RPR model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.05). |
0.0
|
Omega
|
type
|
Anisotropy factor (0.5 < Omega < 1). |
0.0
|
alpha
|
float
|
Retardance rate (0 < alpha < 1). |
0.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] Tseng, Huan-Chang; Chang, Rong-Yeu; Hsu, Chia-Hsiang, 'The use of principal spatial tensor to predict anisotropic fiber orientation in concentrated fiber suspensions', Journal of Rheology 62, 313, 2017. https://doi.org/10.1122/1.4998520
rsc_ode(a, A, D, W, xi, Ci=0.0, kappa=1.0, **kwargs)
¶
ODE describing RSC model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second-order fiber orientation tensor. |
required |
A
|
3x3x3x3 numpy array
|
Fourth-order fiber orientation tensor. |
required |
D
|
3x3 numpy array
|
Symmetric part of velocity gradient tensor. |
required |
W
|
3x3 numpy array
|
Skew-symmetric part of velocity gradient tensor. |
required |
xi
|
float
|
Shape factor computed from aspect ratio. |
required |
Ci
|
float
|
Fiber interaction constant (typically 0 < Ci < 0.05). |
0.0
|
kappa
|
float
|
Strain reduction factor (0 < kappa < 1). |
1.0
|
Returns:
| Type | Description |
|---|---|
3x3 numpy array
|
Orientation tensor rate. |
References
.. [1] Jin Wang, John F. O'Gara, and Charles L. Tucker, 'An objective model for slow orientation kinetics in concentrated fiber suspensions: Theory and rheological evidence', Journal of Rheology 52, 1179, 2008. https://doi.org/10.1122/1.2946437
Closures¶
IBOF_closure(a)
¶
Generate IBOF closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
3x3 numpy array
|
Second order fiber orientation tensor. |
required |
Returns:
| Type | Description |
|---|---|
3x3x3x3 numpy array
|
Fourth order fiber orientation tensor. |
References
.. [1] Du Hwan Chung and Tai Hun Kwon, 'Invariant-based optimal fitting closure approximation for the numerical prediction of flow-induced fiber orientation', Journal of Rheology 46(1):169-194, https://doi.org/10.1122/1.1423312
assert_fot4_properties(A)
¶
Assert properties of fourth order fiber orientation tensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the trailing dimensions are not 3x3x3x3. |
assert_fot_properties(a)
¶
Assert properties of second order input tensor.
Symmetry is assumed but not verified: integrating an orientation model lets the tensor drift from exact symmetry by a few ulp, and this runs on every closure evaluation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
(Mx)3x3 numpy array
|
(Array of) Second order fiber orientation tensor. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the trailing dimensions are not 3x3. |
compute_closure(a, closure='IBOF')
¶
Compute closure for second or fourth order fiber orientation tensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
np.ndarray (Nx)3x3 or (Nx)3x3x3x3
|
Fiber orientation tensor second or fourth order. |
required |
closure
|
str
|
Closure type, by default "IBOF" |
'IBOF'
|
Returns:
| Type | Description |
|---|---|
np.ndarray (Nx)3x3x3x3 or (Nx)3x3x3x3x3x3
|
Fiber orientation tensor fourth or sixth order. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the closure type is not recognized. |
compute_closure_FOT2(a, closure='IBOF')
¶
Create a fourth order tensor from a second order tensor.
This is essentially a wrapper around all closures.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
(Mx)3x3 numpy array
|
(Array of) Second order fiber orientation tensor. |
required |
closure
|
str
|
Closure type, by default "IBOF". |
'IBOF'
|
Returns:
| Type | Description |
|---|---|
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
compute_closure_FOT4(A, closure='QUADRATIC')
¶
Create a sixth order tensor from a fourth order tensor.
This is essentially a wrapper around all closures.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
required |
closure
|
str
|
Closure type, by default "QUADRATIC". |
'QUADRATIC'
|
Returns:
| Type | Description |
|---|---|
(Mx)3x3x3x3x3x3 numpy array
|
(Array of) Sixth order fiber orientation tensor. |
get_random_tensor_pair(seed=None, N=1000, rng=None)
¶
Sample a random fiber orientation and compute second and fourth order tensors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
3x3 numpy array
|
Second order fiber orientation tensor describing the seed distribution. The default is the isotropic tensor. |
None
|
N
|
int
|
number of random fibers. The default is 1000. |
1000
|
rng
|
Generator
|
Random number generator. Pass a seeded generator for reproducible results. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
a |
3x3 numpy array
|
Second order fiber orientation tensor |
A |
3x3x3x3 numpy array
|
Fourth order fiber orientation tensor. |
hybrid_closure(a)
¶
Generate a hybrid closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
(Mx)3x3 numpy array
|
(Array of) Second order fiber orientation tensor. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
References
.. [1] Kyeong-Hee Han and Yong-Taek Im, 'Modified hybrid closure approximation for prediction of flow-induced fiber orientation' Journal of Rheology 43, 569 (1999) https://doi.org/10.1122/1.551002
hybrid_closure_FOT4(A)
¶
Generate a hybrid closure for a fourth order tensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
required |
Returns:
| Type | Description |
|---|---|
(Mx)3x3x3x3x3x3 numpy array
|
(Array of) Sixth order fiber orientation tensor. |
References
.. [1] Advani, Suresh G.; Tucker, Charles L. (1987), 'The Use of Tensors to Describe and Predict Fiber Orientation in Short Fiber Composites', Journal of Rheology 31(8), 751-784. https://doi.org/10.1122/1.549945
implicit_hybrid_closure(a, eps_newton=1e-12, n_iter_newton=25)
¶
Generate implicit hybrid closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
...x3x3 numpy array
|
(Array of) second order fiber orientation tensor. |
required |
eps_newton
|
float
|
convergence criterion for newton algorithm optional: default 1.0e-12 |
1e-12
|
n_iter_newton
|
int
|
number of maximum iterations in newton algorithm optional: default 25 |
25
|
Returns:
| Type | Description |
|---|---|
...x3x3x3x3 numpy array
|
Fourth order fiber orientation tensor. |
References
.. [1] Karl, Tobias, Matti Schneider, and Thomas Böhlke, 'On fully symmetric implicit closure approximations for fiber orientation tensors', Journal of Non-Newtonian Fluid Mechanics 318 : 105049, https://doi.org/10.1016/j.jnnfm.2023.105049
Notes
There seems to be a typo in the expression for f_prime in the original work.
linear_closure(a)
¶
Generate a linear closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
(Mx)3x3 numpy array
|
(Array of) Second order fiber orientation tensor. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
References
.. [1] Kyeong-Hee Han and Yong-Taek Im, 'Modified hybrid closure approximation for prediction of flow-induced fiber orientation' Journal of Rheology 43, 569 (1999) https://doi.org/10.1122/1.551002
linear_closure_FOT4(A)
¶
Generate a linear closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
required |
Returns:
| Type | Description |
|---|---|
(Mx)3x3x3x3x3x3 numpy array
|
(Array of) Sixth order fiber orientation tensor. |
References
.. [1] Advani, Suresh G.; Tucker, Charles L. (1987), 'The Use of Tensors to Describe and Predict Fiber Orientation in Short Fiber Composites', Journal of Rheology 31(8), 751-784. https://doi.org/10.1122/1.549945
orthotropic_fitted_closures(a, closure='ORF')
¶
Generate an orthotropic fitted closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
(Mx)3x3 numpy array
|
(Array of) Second order fiber orientation tensor. |
required |
closure
|
str
|
Closure type, one of "ORF", "ORW" or "ORW3". The default is "ORF". |
'ORF'
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
References
.. [1] Joaquim S. Cintra and Charles L. Tucker III (1995), 'Orthotropic closure approximations for flow-induced fiber orientation', Journal of Rheology, 39(6), 1095-1122. https://doi.org/10.1122/1.550630
.. [2] Du Hwan Chung and Tai Hun Kwon (2001), 'Improved model of orthotropic closure approximation for flow induced fiber orientation', Polymer Composites, 22(5), 636-649. https://doi.org/10.1002/pc.10566
quadratic_closure(a)
¶
Generate a quadratic closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
(Mx)3x3 numpy array
|
(Array of) Second order fiber orientation tensor. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
(Mx)3x3x3x3 numpy arrayF
|
(Array of) Fourth order fiber orientation tensor. |
References
.. [1] Kyeong-Hee Han and Yong-Taek Im, 'Modified hybrid closure approximation for prediction of flow-induced fiber orientation' Journal of Rheology 43, 569 (1999) https://doi.org/10.1122/1.551002
quadratic_closure_FOT4(A)
¶
Generate a quadratic closure, A6 = A x a.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
required |
Returns:
| Type | Description |
|---|---|
(Mx)3x3x3x3x3x3 numpy array
|
(Array of) Sixth order fiber orientation tensor. |
References
.. [1] Advani, Suresh G.; Tucker, Charles L. (1987), 'The Use of Tensors to Describe and Predict Fiber Orientation in Short Fiber Composites', Journal of Rheology 31(8), 751-784. https://doi.org/10.1122/1.549945
symm(A)
¶
Symmetrize the fourth order tensor.
This function computes the symmetric part of a fourth order tensor A and returns a symmetric fourth order tensor S.
symmetric_implicit_closure(a, eps_newton=1e-12, n_iter_newton=25)
¶
Generate SIQ closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
...x3x3 numpy array
|
(Array of) second order fiber orientation tensor. |
required |
eps_newton
|
float
|
convergence criterion for newton algorithm optional: default 1.0e-12 |
1e-12
|
n_iter_newton
|
int
|
number of maximum iterations in newton algorithm optional: default 25 |
25
|
Returns:
| Type | Description |
|---|---|
...x3x3x3x3 numpy array
|
Fourth order fiber orientation tensor. |
References
.. [1] Karl, Tobias, Matti Schneider, and Thomas Böhlke, 'On fully symmetric implicit closure approximations for fiber orientation tensors', Journal of Non-Newtonian Fluid Mechanics 318 : 105049, https://doi.org/10.1016/j.jnnfm.2023.105049
symmetric_quadratic_closure(a)
¶
Generate a symmetric quadratic closure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
(Mx)3x3 numpy array
|
(Array of) Second order fiber orientation tensor. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
(Mx)3x3x3x3 numpy array
|
(Array of) Fourth order fiber orientation tensor. |
References
.. [1] Karl, Tobias and Gatti, Davide and Frohnapfel, Bettina and Böhlke, Thomas, 'Asymptotic fiber orientation states of the quadratically closed Folgar--Tucker equation and a subsequent closure improvement', Journal of Rheology 65(5) : 999-1022, https://doi.org/10.1122/8.0000245
Notes
In general, the SQC does not contract to its second-order input.
Aspect Ratios¶
get_cox_aspect_ratio(aspect_ratio)
¶
Compute an equivalent aspect ratio according to Cox.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aspect_ratio
|
float
|
Aspect ratio of a cylindrical fiber. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Equivalent aspect ratio for an ellipsoid. |
References
.. [1] Cox, R.G. 'The motion of long slender bodies in a viscous fluid Part 2. Shear flow.', J. Fluid Mech. 1971, 45, 625-657. https://doi.org/10.1017/S0022112071000259
get_zhang_aspect_ratio(aspect_ratio)
¶
Compute an equivalent aspect ratio according to Zhang.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aspect_ratio
|
float
|
Aspect ratio of a cylindrical fiber. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Equivalent aspect ratio for an ellipsoid. |
References
.. [1] Zhang, D.; Smith, D.E.; Jack, D.A.; Montgomery-Smith, S., 'Numerical Evaluation of Single Fiber Motion for Short-Fiber-Reinforced Composite Materials Processing.' J. Manuf. Sci. Eng. 2011, 133, 51002. https://doi.org/10.1115/1.4004831
Fitting¶
compute_error(values, keys, t, reference, ode, xi, L)
¶
Compute the error between dataset mean and solution.
fit_optimal_params(t, reference, ode, xi, L, keys, values, bounds)
¶
Apply least-squares optimization to find optimal parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
numpy array
|
Desired output times. |
required |
reference
|
numpy array
|
Reference solution for each time step to be fitted. |
required |
ode
|
function handle
|
function that describes the fiber orientation model, e.g. 'folgar_tucker_ode'. |
required |
xi
|
float
|
shape_factor |
required |
L
|
function hanlde
|
Velocity gradient as function of time. |
required |
keys
|
list of str
|
parameters names passed for optimization. |
required |
values
|
Initial guess for the parameters to be optimized. |
required | |
bounds
|
tuple of list of floats
|
Upper and lower bounds of the parameters for optimization. |
required |
Returns:
| Type | Description |
|---|---|
list
|
Optimal parameter set, resulting fiber orientation evolution, optimizer message. |
Tensor Plots¶
plot_orbit2(ax, plotargs, *tensors)
¶
Orbital plot of a second order.
plot_orbit4(ax, plotargs, *tensors)
¶
Orbital plot of a second order.
plot_projection2(ax, plane, *tensors)
¶
Orbital plot of a second order.
plot_projection4(ax, plane, *tensors)
¶
Orbital plot of a second order.
sample_circle(plane='xy', N=100)
¶
Define all angles in a certain plane.
sample_sphere(N=100)
¶
Define all spherical angles.
Constants¶
Index of each tensor component in a flattened second order tensor.
COMPS = {'A11': 0, 'A12': 1, 'A13': 2, 'A21': 3, 'A22': 4, 'A23': 5, 'A31': 6, 'A32': 7, 'A33': 8}
module-attribute
¶
Index of each component in a second order tensor flattened row by row.