Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fluidparticles
MigFlow
Commits
fef71350
Commit
fef71350
authored
Sep 19, 2017
by
Matthieu Constant
Browse files
correction force 2d
parent
9f7b525f
Changes
1
Hide whitespace changes
Inline
Side-by-side
marblesbag/src/fluid_problem.c
View file @
fef71350
...
...
@@ -133,7 +133,7 @@ static void particle_drag(double u[2], double mu, double rho, double d, double c
Cd_u
=
Cd_u
*
Cd_u
;
double
f
=
pow
(
c
,
-
1
.
8
);
double
r
=
d
/
2
.;
double
GoU
=
f
*
Cd_u
*
rho
/
2
*
(
M_PI
*
r
*
r
);
double
GoU
=
f
*
Cd_u
*
rho
/
2
*
(
2
*
r
);
double
a
=
0
;
double
h
=
(
1
+
(
1
-
c
)
*
rhop
/
(
c
*
rho
)
+
a
)
/
(
a
+
1
);
...
...
@@ -697,7 +697,11 @@ void fluid_problem_adapt_gen_mesh(FluidProblem *problem, double gradmin, double
/* ngrad2 += gradP*gradP;*/
/* }*/
double
ngrad
=
sqrt
(
ngrad2
);
#if DIMENSION == 2
double
lc
=
lcmin
/
fmin
(
1
,
fmax
(
ngrad
/
(
gradmax
),
gradmin
/
(
gradmax
)));
#else
double
lc
=
lcmin
/
fmin
(
1
,
fmax
(
ngrad
*
ngrad
/
(
gradmax
*
gradmax
),
gradmin
*
gradmin
/
(
gradmax
*
gradmax
)));
#endif
for
(
int
j
=
0
;
j
<
N_N
;
++
j
){
new_mesh_size
[
el
[
j
]]
+=
lc
;
num_lc
[
el
[
j
]]
+=
1
.;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment