Basilisk source code (http://basilisk.fr/src/)

root / src / fene-p.h.page

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
# Functions $f_s$ and $f_r$ for the FENE-P model

See [log-conform.h](). */

double L2 = 1.;

static void fenep (double trA, double * nu, double * eta) {
  *eta = 1;
  *nu = 1./(1. - trA/L2);
  return;
} 

event defaults (i = 0) {
  f_s = fenep;
  f_r = fenep;
}

event init (i = 0) {
#if AXI
  double dim = 3;
#else
  double dim = dimension;
#endif  
  scalar trac = trA;
  foreach()
    trac[] = dim*L2/(dim + L2);
}