Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
amdis
Commits
0a1b62cf
Commit
0a1b62cf
authored
Jul 29, 2012
by
Praetorius, Simon
Browse files
navierstokes demo
parent
e146b59c
Changes
11
Hide whitespace changes
Inline
Side-by-side
demo/CMakeLists.txt
View file @
0a1b62cf
...
...
@@ -105,6 +105,16 @@ if (TOOLS_DIR)
add_executable
(
"drivenCavity"
${
drivenCavity
}
)
target_link_libraries
(
"drivenCavity"
${
BASIS_LIBS
}
)
include_directories
(
/home/spraetor/projects/src/common
)
set
(
navierStokes
${
TOOLS_DIR
}
/diffuseDomain/POperators.cc
# ${TOOLS_DIR}/baseProblems/NavierStokes_TaylorHood.cc
${
TOOLS_DIR
}
/baseProblems/NavierStokes_TaylorHood_RB.cc
${
TOOLS_DIR
}
/baseProblems/time/ExtendedRosenbrockStationary.cc
/home/spraetor/projects/src/common/GeometryTools.cc
src/navierStokes.cc
)
add_executable
(
"navierStokes"
${
navierStokes
}
)
target_link_libraries
(
"navierStokes"
${
BASIS_LIBS
}
)
endif
()
else
()
message
(
WARNING
"No tools directory specified! Some demos will not be build."
)
...
...
demo/init/elliptImplicit.dat.2d
View file @
0a1b62cf
...
...
@@ -12,8 +12,8 @@ mesh->refinement->interface width: 0.01
ellipt->mesh: elliptMesh
ellipt->dim: 2
ellipt->components: 1
ellipt->polynomial degree[0]:
1
ellipt->polynomial degree[0]:
2
ellipt->solver: cg
ellipt->solver->ell: 1
ellipt->solver->max iteration: 1000
...
...
@@ -33,7 +33,7 @@ ellipt->marker[0]->MSGamma: 0.5
ellipt->adapt[0]->tolerance: 1e-6
ellipt->adapt[0]->refine bisections: 2
ellipt->adapt->max iteration:
5
ellipt->adapt->max iteration:
10
ellipt->output->filename: output/elliptImplicit.2d
ellipt->output->ParaView format: 1
...
...
demo/init/navierStokes.dat.2d
0 → 100644
View file @
0a1b62cf
dimension of world: 2
% ====================== VARIABLES ========================
output_folder: output
output_postfix: _ns
mesh_name: mesh
polynomial-degree: 1
% ====================== MESH =============================
mesh->H: 4.1
% ====================== MESH =============================
${mesh_name}->macro file name: macro/kanal_msh.2d
${mesh_name}->global refinements: 0
${mesh_name}->check: 0
% ====================== INCLUDES =========================
#include "init/navierStokes_TaylorHood.inc.2d"
% ====================== USER_PARAMETER - NS ==============
ns->viscosity: 1/100
ns->theta: 0.5
%ns->force: [0.0, 9.81] % gravitational force [m/s^2]
ns->force dirichlet bc: 0
ns->Um: 1.5
ns->initial velocity: 0
ns->initial velocity value: 0.0
ns->laplace operator: 0 % 0... div(nu*grad(u)), 1... div(0.5*nu*(grad(u)+grad(u)^T)) [sehr langsam]
ns->non-linear term: 2 % 0... u^old*grad(u_i^old), 1... u'*grad(u_i^old), 2... u^old*grad(u'_i)
% ====================== TIMESTEPS ========================
adapt->max iteration: 1
adapt->max timestep iteration: 1
adapt->max time iteration: 1
adapt->timestep: 5.e-4
adapt->max timestep: 1e+10
adapt->min timestep: 1e-6
adapt->start time: 0.0
adapt->end time: 10
% ====================== ESTIMATORS =======================
adapt->strategy: 0 % 0=explicit, 1=implicit
WAIT: 1
demo/init/navierStokes_Chorin.inc.2d
0 → 100644
View file @
0a1b62cf
${ns}->predictor->mesh: ${mesh_name}
${ns}->pressure->mesh: ${mesh_name}
${ns}->corrector->mesh: ${mesh_name}
% ============ USER_PARAMETERS - NS =================================
${ns}->viscosity: 1
${ns}->beta: 1
${ns}->sigma: 0.072
${ns}->exponent: 2
%${ns}->force: [0.0, -9.81] % gravitational force
${ns}->viscosity1: 1
${ns}->viscosity2: ${${ns}->viscosity1}/1000
${ns}->force dirichlet bc: 0
${ns}->poisson problem pertubation: 0 % 1..applySingularPertubation, 2..applySingularDBC, 0..nothing
${ns}->simple algorithm: 1
${ns}->calculate pressure: 0
${ns}->initial velocity: 3
${ns}->initial velocity value: 0.1
${ns}->laplace operator: 1 % 0... div(nu*grad(u)), 1... div(0.5*nu*(grad(u)+grad(u)^T)) [sehr langsam]
${ns}->non-linear term: 2 % 0... u^old*grad(u_i^old), 1... u'*grad(u_i^old), 2... u^old*grad(u'_i)
% =========== OUTPUT ==============================================
${ns}->predictor->output->filename: ${output_folder}/velocity/predictor${output_postfix}_
${ns}->pressure->output->filename: ${output_folder}/velocity/pressure${output_postfix}_
${ns}->corrector->output->filename: ${output_folder}/velocity/velocity${output_postfix}_
% ============= PROBLEM-SPACES ==================================
${ns}->predictor->components: 2
${ns}->pressure->components: 1
${ns}->corrector->components: 2
${ns}->predictor->polynomial degree[0]: ${polynomial-degree}
${ns}->predictor->polynomial degree[1]: ${polynomial-degree}
${ns}->pressure->polynomial degree[0]: ${polynomial-degree}
${ns}->corrector->polynomial degree[0]: ${polynomial-degree}
${ns}->corrector->polynomial degree[1]: ${polynomial-degree}
${ns}->predictor->dim: 2
${ns}->pressure->dim: 2
${ns}->corrector->dim: 2
${ns}->pressure->name: pressure
${ns}->corrector->name: velocity
% ================== SOLVER ======================================
${ns}->predictor->solver: umfpack
${ns}->predictor->solver->symmetric strategy: 0
${ns}->predictor->solver->ell: 3
${ns}->predictor->solver->max iteration: 500
${ns}->predictor->solver->restart: 10 % only used for GMRES
${ns}->predictor->solver->tolerance: 1.e-8
${ns}->predictor->solver->info: 1
${ns}->predictor->solver->left precon: ilu
${ns}->predictor->petsc->ksp_type: preonly
${ns}->predictor->petsc->pc_type: lu
${ns}->predictor->petsc->pc_factor_mat_solver_package: mumps
${ns}->pressure->solver: umfpack
${ns}->pressure->solver->symmetric strategy: 0
${ns}->pressure->solver->ell: 3
${ns}->pressure->solver->max iteration: 500
${ns}->pressure->solver->tolerance: 1.e-8
${ns}->pressure->solver->info: 1
${ns}->pressure->solver->left precon: ilu
${ns}->pressure->petsc->ksp_type: preonly
${ns}->pressure->petsc->pc_type: lu
${ns}->pressure->petsc->pc_factor_mat_solver_package: mumps
${ns}->corrector->solver: umfpack
${ns}->corrector->solver->symmetric strategy: 0
${ns}->corrector->solver->ell: 3
${ns}->corrector->solver->max iteration: 500
${ns}->corrector->solver->tolerance: 1.e-8
${ns}->corrector->solver->info: 1
${ns}->corrector->solver->left precon: ilu
${ns}->corrector->petsc->ksp_type: preonly
${ns}->corrector->petsc->pc_type: lu
${ns}->corrector->petsc->pc_factor_mat_solver_package: mumps
% =================== OUTPUT =========================================
${ns}->predictor->output->ParaView animation: 0
${ns}->predictor->output->ParaView format: 0
${ns}->predictor->output->write every i-th timestep: 1
%${ns}->predictor->output->compression: gzip
${ns}->predictor->output->append index: 1
${ns}->predictor->output->index length: 7
${ns}->predictor->output->index decimals: 5
${ns}->pressure->output->ParaView animation: 0
${ns}->pressure->output->ParaView format: 0
${ns}->pressure->output->write every i-th timestep: 1
%${ns}->pressure->output->compression: gzip
${ns}->pressure->output->append index: 1
${ns}->pressure->output->index length: 7
${ns}->pressure->output->index decimals: 5
${ns}->corrector->output->ParaView animation: 1
${ns}->corrector->output->ParaView vector format: 1
${ns}->corrector->output->write vector as 3d vector: 1
${ns}->corrector->output->write every i-th timestep: 1
%${ns}->corrector->output->compression: gzip
${ns}->corrector->output->append index: 1
${ns}->corrector->output->index length: 7
${ns}->corrector->output->index decimals: 5
demo/init/navierStokes_rb.dat.2d
0 → 100644
View file @
0a1b62cf
dimension of world: 2
% ====================== VARIABLES ========================
output_folder: output
output_postfix: _refinement3
mesh_name: mesh
polynomial-degree: 1
% ====================== MESH =============================
mesh->H: 4.1
obstacle->num vertices: 7
obstacle->vertex[0]: [1.5, 2]
obstacle->vertex[1]: [2, 2.5]
% obstacle->vertex[2]: [4.5, 2]
% obstacle->vertex[3]: [2, 1.5]
obstacle->vertex[2]: [2.5, 2.05]
obstacle->vertex[3]: [6.5, 2.05]
obstacle->vertex[4]: [6.5, 1.95]
obstacle->vertex[5]: [2.5, 1.95]
obstacle->vertex[6]: [2, 1.5]
mesh->refinement->initial level: 1
mesh->refinement->level on interface: 6
mesh->refinement->level in inner domain: 1
mesh->refinement->level in outer domain: 1
mesh->refinement->interface width: 0.5
mesh->refinement->fade out width: 1.0
% ====================== MESH =============================
${mesh_name}->macro file name: macro/kanal_square_fin.2d
${mesh_name}->global refinements: 0
${mesh_name}->check: 0
% ====================== INCLUDES =========================
#include "init/navierStokes_TaylorHood.inc.2d"
% ====================== USER_PARAMETER - NS ==============
ns->viscosity: 1/500
ns->theta: 0.5
%ns->force: [0.0, 9.81] % gravitational force [m/s^2]
ns->force dirichlet bc: 0
ns->Um: 1.5
ns->initial velocity: 0
ns->initial velocity value: 0.0
ns->laplace operator: 0 % 0... div(nu*grad(u)), 1... div(0.5*nu*(grad(u)+grad(u)^T)) [sehr langsam]
ns->non-linear term: 2 % 0... u^old*grad(u_i^old), 1... u'*grad(u_i^old), 2... u^old*grad(u'_i)
% ====================== TIMESTEPS ========================
adapt->rosenbrock method: rodasp
adapt->fix first timesteps: 0
adapt->rosenbrock->timestep study: 0
adapt->rosenbrock->timestep study steps: 0
adapt->rosenbrock->error weights: [1,1,1]
adapt[0]->time tolerance: 1.e-3
adapt->timestep: 5.e-4
adapt->max timestep: 1e+1
adapt->min timestep: 1e-4
adapt->start time: 0.0
adapt->end time: 25.0
% ====================== ESTIMATORS =======================
adapt->strategy: 0 % 0=explicit, 1=implicit
%ns->space->estimator[0]: residual
%ns->space->estimator[0]->error norm: 1 % 1: H1_NORM, 2: L2_NORM
%ns->space->estimator[0]->C0: 0.1 % constant of element residual
%ns->space->estimator[0]->C1: 0.1 % constant of jump residual
ns->space->marker[0]->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
adapt[0]->tolerance: 1e-3
adapt->max iteration: 0
WAIT: 1
demo/init/pfc.dat.2d
View file @
0a1b62cf
...
...
@@ -39,7 +39,11 @@ adapt->timestep: 1.e-1
adapt->max timestep: 1e+10
adapt->min timestep: 1e-10
adapt->start time: 0.0
adapt->end time: 50.0
adapt->end time: 10000.0
adapt->sequence->calc end time: 0
adapt->sequence->timesteps: [1.e-2,2.e-2,5.e-2,1.e-1]
adapt->sequence->number of timesteps: [500,1500,1500,1500]
% =================== OUTPUT =========================================
...
...
demo/macro/kanal_square.2d
0 → 100644
View file @
0a1b62cf
Changes suppressed. Click to show.
DIM: 2
DIM_OF_WORLD: 2
number of elements: 1592
number of vertices: 858
vertex coordinates:
0 0
0.5 0
1 0
1.5 0
2 0
2.5 0
3 0
3.5 0
4 0
4.5 0
5 0
5.5 0
6 0
6.5 0
7 0
7.5 0
8 0
8.5 0
9 0
9.5 0
10 0
10.5 0
11 0
11.5 0
12 0
12.5 0
13 0
13.5 0
14 0
14.5 0
15 0
15.5 0
16 0
16.5 0
17 0
17.5 0
18 0
18.5 0
19 0
19.5 0
20 0
20.5 0
21 0
21.5 0
22 0
22.5 0
23 0
23.5 0
24 0
24.5 0
25 0
0 0.5
0.5 0.5
1 0.5
1.5 0.5
2 0.5
2.5 0.5
3 0.5
3.5 0.5
4 0.5
4.5 0.5
5 0.5
5.5 0.5
6 0.5
6.5 0.5
7 0.5
7.5 0.5
8 0.5
8.5 0.5
9 0.5
9.5 0.5
10 0.5
10.5 0.5
11 0.5
11.5 0.5
12 0.5
12.5 0.5
13 0.5
13.5 0.5
14 0.5
14.5 0.5
15 0.5
15.5 0.5
16 0.5
16.5 0.5
17 0.5
17.5 0.5
18 0.5
18.5 0.5
19 0.5
19.5 0.5
20 0.5
20.5 0.5
21 0.5
21.5 0.5
22 0.5
22.5 0.5
23 0.5
23.5 0.5
24 0.5
24.5 0.5
25 0.5
0 1
0.5 1
1 1
1.5 1
2 1
2.5 1
3 1
3.5 1
4 1
4.5 1
5 1
5.5 1
6 1
6.5 1
7 1
7.5 1
8 1
8.5 1
9 1
9.5 1
10 1
10.5 1
11 1
11.5 1
12 1
12.5 1
13 1
13.5 1
14 1
14.5 1
15 1
15.5 1
16 1
16.5 1
17 1
17.5 1
18 1
18.5 1
19 1
19.5 1
20 1
20.5 1
21 1
21.5 1
22 1
22.5 1
23 1
23.5 1
24 1
24.5 1
25 1
0 1.5
0.5 1.5
1 1.5
1.5 1.5
2 1.5
2.5 1.5
3 1.5
3.5 1.5
4 1.5
4.5 1.5
5 1.5
5.5 1.5
6 1.5
6.5 1.5
7 1.5
7.5 1.5
8 1.5
8.5 1.5
9 1.5
9.5 1.5
10 1.5
10.5 1.5
11 1.5
11.5 1.5
12 1.5
12.5 1.5
13 1.5
13.5 1.5
14 1.5
14.5 1.5
15 1.5
15.5 1.5
16 1.5
16.5 1.5
17 1.5
17.5 1.5
18 1.5
18.5 1.5
19 1.5
19.5 1.5
20 1.5
20.5 1.5
21 1.5
21.5 1.5
22 1.5
22.5 1.5
23 1.5
23.5 1.5
24 1.5
24.5 1.5
25 1.5
0 2
0.5 2
1 2
1.5 2
2.5 2
3 2
3.5 2
4 2
4.5 2
5 2
5.5 2
6 2
6.5 2
7 2
7.5 2
8 2
8.5 2
9 2
9.5 2
10 2
10.5 2
11 2
11.5 2
12 2
12.5 2
13 2
13.5 2
14 2
14.5 2
15 2
15.5 2
16 2
16.5 2
17 2
17.5 2
18 2
18.5 2
19 2
19.5 2
20 2
20.5 2
21 2
21.5 2
22 2
22.5 2
23 2
23.5 2
24 2
24.5 2
25 2
0 2.5
0.5 2.5
1 2.5
1.5 2.5
2.5 2.5
3 2.5
3.5 2.5
4 2.5
4.5 2.5
5 2.5
5.5 2.5
6 2.5
6.5 2.5
7 2.5
7.5 2.5
8 2.5
8.5 2.5
9 2.5
9.5 2.5
10 2.5
10.5 2.5
11 2.5
11.5 2.5
12 2.5
12.5 2.5
13 2.5
13.5 2.5
14 2.5
14.5 2.5
15 2.5
15.5 2.5
16 2.5
16.5 2.5
17 2.5
17.5 2.5
18 2.5
18.5 2.5
19 2.5
19.5 2.5
20 2.5
20.5 2.5
21 2.5
21.5 2.5
22 2.5
22.5 2.5
23 2.5
23.5 2.5
24 2.5
24.5 2.5
25 2.5
2 2.5
0 3.033333333
0.5 3.033333333
1 3.033333333
1.5 3.033333333
2 3.033333333
2.5 3.033333333
3 3.033333333
3.5 3.033333333
4 3.033333333
4.5 3.033333333
5 3.033333333
5.5 3.033333333
6 3.033333333
6.5 3.033333333
7 3.033333333
7.5 3.033333333
8 3.033333333
8.5 3.033333333
9 3.033333333
9.5 3.033333333
10 3.033333333
10.5 3.033333333
11 3.033333333
11.5 3.033333333
12 3.033333333
12.5 3.033333333
13 3.033333333
13.5 3.033333333
14 3.033333333
14.5 3.033333333
15 3.033333333
15.5 3.033333333
16 3.033333333
16.5 3.033333333
17 3.033333333
17.5 3.033333333
18 3.033333333
18.5 3.033333333
19 3.033333333
19.5 3.033333333
20 3.033333333