Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Tree_parametrization
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alice MAISON
Tree_parametrization
Commits
3d521c21
Commit
3d521c21
authored
Jun 16, 2021
by
cedric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cs_meg files and temporary files
parent
4e5874de
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
0 additions
and
1108 deletions
+0
-1108
Intermediate_Canyon/cs_meg_boundary_function.c
Intermediate_Canyon/cs_meg_boundary_function.c
+0
-120
Intermediate_Canyon/cs_meg_initialization.c
Intermediate_Canyon/cs_meg_initialization.c
+0
-185
Intermediate_Canyon/cs_meg_source_terms.c
Intermediate_Canyon/cs_meg_source_terms.c
+0
-64
Large_Canyon
Large_Canyon
+0
-1
Large_canyon/.gitkeep
Large_canyon/.gitkeep
+0
-0
Large_canyon/cs_meg_boundary_function.c
Large_canyon/cs_meg_boundary_function.c
+0
-120
Large_canyon/cs_meg_initialization.c
Large_canyon/cs_meg_initialization.c
+0
-185
Large_canyon/cs_meg_source_terms.c
Large_canyon/cs_meg_source_terms.c
+0
-64
Narrow_Canyon/cs_meg_boundary_function.c
Narrow_Canyon/cs_meg_boundary_function.c
+0
-120
Narrow_Canyon/cs_meg_initialization.c
Narrow_Canyon/cs_meg_initialization.c
+0
-185
Narrow_Canyon/cs_meg_source_terms.c
Narrow_Canyon/cs_meg_source_terms.c
+0
-64
No files found.
Intermediate_Canyon/cs_meg_boundary_function.c
deleted
100644 → 0
View file @
4e5874de
/*----------------------------------------------------------------------------*/
/*
This file is generated by Code_Saturne, a general-purpose CFD tool.
*/
/*----------------------------------------------------------------------------*/
#include "cs_defs.h"
/*----------------------------------------------------------------------------
* Standard C library headers
*----------------------------------------------------------------------------*/
#include <assert.h>
#include <math.h>
#if defined(HAVE_MPI)
#include <mpi.h>
#endif
/*----------------------------------------------------------------------------
* Local headers
*----------------------------------------------------------------------------*/
#include "cs_headers.h"
/*----------------------------------------------------------------------------*/
BEGIN_C_DECLS
/*----------------------------------------------------------------------------*/
cs_real_t
*
cs_meg_boundary_function
(
const
cs_zone_t
*
zone
,
const
char
*
field_name
,
const
char
*
condition
)
{
cs_real_t
*
new_vals
=
NULL
;
/*--------------------------------------------------*/
/* User defined formula for "velocity" over BC=BC_2 */
if
(
strcmp
(
field_name
,
"velocity"
)
==
0
&&
strcmp
(
condition
,
"norm_formula"
)
==
0
&&
strcmp
(
zone
->
name
,
"BC_2"
)
==
0
)
{
const
cs_real_3_t
*
xyz
=
(
cs_real_3_t
*
)
cs_glob_mesh_quantities
->
b_face_cog
;
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
H
=
cs_notebook_parameter_value_by_name
(
"H"
);
const
cs_real_t
zref
=
cs_notebook_parameter_value_by_name
(
"zref"
);
const
cs_real_t
Uref
=
cs_notebook_parameter_value_by_name
(
"Uref"
);
const
cs_real_t
z0
=
cs_notebook_parameter_value_by_name
(
"z0"
);
const
cs_real_t
k
=
cs_notebook_parameter_value_by_name
(
"k"
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
f_id
=
zone
->
elt_ids
[
e_id
];
const
cs_real_t
z
=
xyz
[
f_id
][
2
];
cs_real_t
ustar
=
k
*
Uref
/
log
((
zref
-
H
+
z0
)
/
z0
)
;
new_vals
[
0
*
zone
->
n_elts
+
e_id
]
=
ustar
/
k
*
log
((
z
-
H
+
z0
)
/
z0
)
;
}
}
/*--------------------------------------------------*/
/*---------------------------------------------------*/
/* User defined formula for "direction" over BC=BC_2 */
if
(
strcmp
(
field_name
,
"direction"
)
==
0
&&
strcmp
(
condition
,
"formula"
)
==
0
&&
strcmp
(
zone
->
name
,
"BC_2"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
3
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
phi
=
cs_notebook_parameter_value_by_name
(
"phi"
);
const
cs_real_t
pi
=
cs_math_pi
;
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
f_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
0
*
zone
->
n_elts
+
e_id
]
=
sin
(
phi
*
pi
/
180
)
;
new_vals
[
1
*
zone
->
n_elts
+
e_id
]
=
cos
(
phi
*
pi
/
180
)
;
new_vals
[
2
*
zone
->
n_elts
+
e_id
]
=
0
;
}
}
/*---------------------------------------------------*/
/*-------------------------------------------------------*/
/* User defined formula for "turbulence_ke" over BC=BC_2 */
if
(
strcmp
(
field_name
,
"turbulence_ke"
)
==
0
&&
strcmp
(
condition
,
"formula"
)
==
0
&&
strcmp
(
zone
->
name
,
"BC_2"
)
==
0
)
{
const
cs_real_3_t
*
xyz
=
(
cs_real_3_t
*
)
cs_glob_mesh_quantities
->
b_face_cog
;
const
int
vals_size
=
zone
->
n_elts
*
2
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
H
=
cs_notebook_parameter_value_by_name
(
"H"
);
const
cs_real_t
zref
=
cs_notebook_parameter_value_by_name
(
"zref"
);
const
cs_real_t
Uref
=
cs_notebook_parameter_value_by_name
(
"Uref"
);
const
cs_real_t
z0
=
cs_notebook_parameter_value_by_name
(
"z0"
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
f_id
=
zone
->
elt_ids
[
e_id
];
const
cs_real_t
z
=
xyz
[
f_id
][
2
];
cs_real_t
ustar
=
0
.
41
*
Uref
/
log
((
zref
-
H
+
z0
)
/
z0
)
;
new_vals
[
0
*
zone
->
n_elts
+
e_id
]
=
(
cs_math_pow2
((
ustar
)))
/
(
pow
(
0
.
09
,
0
.
5
))
;
new_vals
[
1
*
zone
->
n_elts
+
e_id
]
=
(
cs_math_pow3
((
ustar
)))
/
(
0
.
41
*
(
z
-
H
+
z0
))
;
}
}
/*-------------------------------------------------------*/
return
new_vals
;
}
/*----------------------------------------------------------------------------*/
END_C_DECLS
Intermediate_Canyon/cs_meg_initialization.c
deleted
100644 → 0
View file @
4e5874de
/*----------------------------------------------------------------------------*/
/*
This file is generated by Code_Saturne, a general-purpose CFD tool.
*/
/*----------------------------------------------------------------------------*/
#include "cs_defs.h"
/*----------------------------------------------------------------------------
* Standard C library headers
*----------------------------------------------------------------------------*/
#include <assert.h>
#include <math.h>
#if defined(HAVE_MPI)
#include <mpi.h>
#endif
/*----------------------------------------------------------------------------
* Local headers
*----------------------------------------------------------------------------*/
#include "cs_headers.h"
/*----------------------------------------------------------------------------*/
BEGIN_C_DECLS
/*----------------------------------------------------------------------------*/
cs_real_t
*
cs_meg_initialization
(
const
cs_zone_t
*
zone
,
const
char
*
field_name
)
{
cs_real_t
*
new_vals
=
NULL
;
/*-----------------------------------------------------------------------*/
/* User defined initialization for variable velocity over zone all_cells */
if
(
strcmp
(
zone
->
name
,
"all_cells"
)
==
0
&&
strcmp
(
field_name
,
"velocity"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
3
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
3
*
e_id
+
0
]
=
0
.
;
new_vals
[
3
*
e_id
+
1
]
=
0
.
;
new_vals
[
3
*
e_id
+
2
]
=
0
.
;
}
}
/*-----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* User defined initialization for variable thermal over zone all_cells */
if
(
strcmp
(
zone
->
name
,
"all_cells"
)
==
0
&&
strcmp
(
field_name
,
"thermal"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
e_id
]
=
293
.
15
;
}
}
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* User defined initialization for variable traceur over zone all_cells */
if
(
strcmp
(
zone
->
name
,
"all_cells"
)
==
0
&&
strcmp
(
field_name
,
"traceur"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
e_id
]
=
0
;
}
}
/*----------------------------------------------------------------------*/
/*------------------------------------------------------------------------*/
/* User defined initialization for variable velocity over zone dessus_rue */
if
(
strcmp
(
zone
->
name
,
"dessus_rue"
)
==
0
&&
strcmp
(
field_name
,
"velocity"
)
==
0
)
{
const
cs_real_3_t
*
xyz
=
(
cs_real_3_t
*
)
cs_glob_mesh_quantities
->
cell_cen
;
const
int
vals_size
=
zone
->
n_elts
*
3
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
H
=
cs_notebook_parameter_value_by_name
(
"H"
);
const
cs_real_t
zref
=
cs_notebook_parameter_value_by_name
(
"zref"
);
const
cs_real_t
Uref
=
cs_notebook_parameter_value_by_name
(
"Uref"
);
const
cs_real_t
z0
=
cs_notebook_parameter_value_by_name
(
"z0"
);
const
cs_real_t
phi
=
cs_notebook_parameter_value_by_name
(
"phi"
);
const
cs_real_t
pi
=
cs_math_pi
;
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
const
cs_real_t
z
=
xyz
[
c_id
][
2
];
new_vals
[
3
*
e_id
+
0
]
=
sin
(
phi
*
pi
/
180
)
*
Uref
*
log
((
z
-
H
+
z0
)
/
z0
)
/
log
((
zref
-
H
+
z0
)
/
z0
)
;
new_vals
[
3
*
e_id
+
1
]
=
cos
(
phi
*
pi
/
180
)
*
Uref
*
log
((
z
-
H
+
z0
)
/
z0
)
/
log
((
zref
-
H
+
z0
)
/
z0
)
;
new_vals
[
3
*
e_id
+
2
]
=
0
.
;
}
}
/*------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/* User defined initialization for variable turbulence over zone dessus_rue */
if
(
strcmp
(
zone
->
name
,
"dessus_rue"
)
==
0
&&
strcmp
(
field_name
,
"turbulence"
)
==
0
)
{
const
cs_real_3_t
*
xyz
=
(
cs_real_3_t
*
)
cs_glob_mesh_quantities
->
cell_cen
;
const
int
vals_size
=
zone
->
n_elts
*
2
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
H
=
cs_notebook_parameter_value_by_name
(
"H"
);
const
cs_real_t
zref
=
cs_notebook_parameter_value_by_name
(
"zref"
);
const
cs_real_t
Uref
=
cs_notebook_parameter_value_by_name
(
"Uref"
);
const
cs_real_t
z0
=
cs_notebook_parameter_value_by_name
(
"z0"
);
const
cs_real_t
k
=
cs_notebook_parameter_value_by_name
(
"k"
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
const
cs_real_t
z
=
xyz
[
c_id
][
2
];
cs_real_t
ustar
=
k
*
Uref
/
(
log
((
zref
-
H
+
z0
)
/
z0
))
;
new_vals
[
2
*
e_id
+
0
]
=
(
cs_math_pow2
((
ustar
)))
/
(
pow
(
0
.
09
,
0
.
5
))
;
new_vals
[
2
*
e_id
+
1
]
=
(
cs_math_pow3
((
ustar
)))
/
(
k
*
(
z
-
H
+
z0
))
;
}
}
/*--------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
/* User defined initialization for variable thermal over zone dessus_rue */
if
(
strcmp
(
zone
->
name
,
"dessus_rue"
)
==
0
&&
strcmp
(
field_name
,
"thermal"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
e_id
]
=
293
.
15
;
}
}
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
/* User defined initialization for variable traceur over zone dessus_rue */
if
(
strcmp
(
zone
->
name
,
"dessus_rue"
)
==
0
&&
strcmp
(
field_name
,
"traceur"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
e_id
]
=
0
;
}
}
/*-----------------------------------------------------------------------*/
return
new_vals
;
}
/*----------------------------------------------------------------------------*/
END_C_DECLS
Intermediate_Canyon/cs_meg_source_terms.c
deleted
100644 → 0
View file @
4e5874de
/*----------------------------------------------------------------------------*/
/*
This file is generated by Code_Saturne, a general-purpose CFD tool.
*/
/*----------------------------------------------------------------------------*/
#include "cs_defs.h"
/*----------------------------------------------------------------------------
* Standard C library headers
*----------------------------------------------------------------------------*/
#include <assert.h>
#include <math.h>
#if defined(HAVE_MPI)
#include <mpi.h>
#endif
/*----------------------------------------------------------------------------
* Local headers
*----------------------------------------------------------------------------*/
#include "cs_headers.h"
/*----------------------------------------------------------------------------*/
BEGIN_C_DECLS
/*----------------------------------------------------------------------------*/
cs_real_t
*
cs_meg_source_terms
(
const
cs_zone_t
*
zone
,
const
char
*
name
,
const
char
*
source_type
)
{
cs_real_t
*
new_vals
=
NULL
;
/*----------------------------------------------------*/
/* User defined source term for traceur over zone rue */
if
(
strcmp
(
zone
->
name
,
"rue"
)
==
0
&&
strcmp
(
name
,
"traceur"
)
==
0
&&
strcmp
(
source_type
,
"scalar_source_term"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
2
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
volume
=
zone
->
measure
;
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
2
*
e_id
+
0
]
=
1
/
volume
;
new_vals
[
2
*
e_id
+
1
]
=
0
;
}
}
/*----------------------------------------------------*/
return
new_vals
;
}
/*----------------------------------------------------------------------------*/
END_C_DECLS
Large_Canyon
@
46d327b4
Subproject commit 46d327b412581401faea2eb9a0e9df59ff41de9d
Large_canyon/.gitkeep
deleted
100644 → 0
View file @
4e5874de
Large_canyon/cs_meg_boundary_function.c
deleted
100644 → 0
View file @
4e5874de
/*----------------------------------------------------------------------------*/
/*
This file is generated by Code_Saturne, a general-purpose CFD tool.
*/
/*----------------------------------------------------------------------------*/
#include "cs_defs.h"
/*----------------------------------------------------------------------------
* Standard C library headers
*----------------------------------------------------------------------------*/
#include <assert.h>
#include <math.h>
#if defined(HAVE_MPI)
#include <mpi.h>
#endif
/*----------------------------------------------------------------------------
* Local headers
*----------------------------------------------------------------------------*/
#include "cs_headers.h"
/*----------------------------------------------------------------------------*/
BEGIN_C_DECLS
/*----------------------------------------------------------------------------*/
cs_real_t
*
cs_meg_boundary_function
(
const
cs_zone_t
*
zone
,
const
char
*
field_name
,
const
char
*
condition
)
{
cs_real_t
*
new_vals
=
NULL
;
/*--------------------------------------------------*/
/* User defined formula for "velocity" over BC=BC_2 */
if
(
strcmp
(
field_name
,
"velocity"
)
==
0
&&
strcmp
(
condition
,
"norm_formula"
)
==
0
&&
strcmp
(
zone
->
name
,
"BC_2"
)
==
0
)
{
const
cs_real_3_t
*
xyz
=
(
cs_real_3_t
*
)
cs_glob_mesh_quantities
->
b_face_cog
;
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
H
=
cs_notebook_parameter_value_by_name
(
"H"
);
const
cs_real_t
zref
=
cs_notebook_parameter_value_by_name
(
"zref"
);
const
cs_real_t
Uref
=
cs_notebook_parameter_value_by_name
(
"Uref"
);
const
cs_real_t
z0
=
cs_notebook_parameter_value_by_name
(
"z0"
);
const
cs_real_t
k
=
cs_notebook_parameter_value_by_name
(
"k"
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
f_id
=
zone
->
elt_ids
[
e_id
];
const
cs_real_t
z
=
xyz
[
f_id
][
2
];
cs_real_t
ustar
=
k
*
Uref
/
log
((
zref
-
H
+
z0
)
/
z0
)
;
new_vals
[
0
*
zone
->
n_elts
+
e_id
]
=
ustar
/
k
*
log
((
z
-
H
+
z0
)
/
z0
)
;
}
}
/*--------------------------------------------------*/
/*---------------------------------------------------*/
/* User defined formula for "direction" over BC=BC_2 */
if
(
strcmp
(
field_name
,
"direction"
)
==
0
&&
strcmp
(
condition
,
"formula"
)
==
0
&&
strcmp
(
zone
->
name
,
"BC_2"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
3
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
phi
=
cs_notebook_parameter_value_by_name
(
"phi"
);
const
cs_real_t
pi
=
cs_math_pi
;
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
f_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
0
*
zone
->
n_elts
+
e_id
]
=
sin
(
phi
*
pi
/
180
)
;
new_vals
[
1
*
zone
->
n_elts
+
e_id
]
=
cos
(
phi
*
pi
/
180
)
;
new_vals
[
2
*
zone
->
n_elts
+
e_id
]
=
0
;
}
}
/*---------------------------------------------------*/
/*-------------------------------------------------------*/
/* User defined formula for "turbulence_ke" over BC=BC_2 */
if
(
strcmp
(
field_name
,
"turbulence_ke"
)
==
0
&&
strcmp
(
condition
,
"formula"
)
==
0
&&
strcmp
(
zone
->
name
,
"BC_2"
)
==
0
)
{
const
cs_real_3_t
*
xyz
=
(
cs_real_3_t
*
)
cs_glob_mesh_quantities
->
b_face_cog
;
const
int
vals_size
=
zone
->
n_elts
*
2
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
H
=
cs_notebook_parameter_value_by_name
(
"H"
);
const
cs_real_t
zref
=
cs_notebook_parameter_value_by_name
(
"zref"
);
const
cs_real_t
Uref
=
cs_notebook_parameter_value_by_name
(
"Uref"
);
const
cs_real_t
z0
=
cs_notebook_parameter_value_by_name
(
"z0"
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
f_id
=
zone
->
elt_ids
[
e_id
];
const
cs_real_t
z
=
xyz
[
f_id
][
2
];
cs_real_t
ustar
=
0
.
41
*
Uref
/
log
((
zref
-
H
+
z0
)
/
z0
)
;
new_vals
[
0
*
zone
->
n_elts
+
e_id
]
=
(
cs_math_pow2
((
ustar
)))
/
(
pow
(
0
.
09
,
0
.
5
))
;
new_vals
[
1
*
zone
->
n_elts
+
e_id
]
=
(
cs_math_pow3
((
ustar
)))
/
(
0
.
41
*
(
z
-
H
+
z0
))
;
}
}
/*-------------------------------------------------------*/
return
new_vals
;
}
/*----------------------------------------------------------------------------*/
END_C_DECLS
Large_canyon/cs_meg_initialization.c
deleted
100644 → 0
View file @
4e5874de
/*----------------------------------------------------------------------------*/
/*
This file is generated by Code_Saturne, a general-purpose CFD tool.
*/
/*----------------------------------------------------------------------------*/
#include "cs_defs.h"
/*----------------------------------------------------------------------------
* Standard C library headers
*----------------------------------------------------------------------------*/
#include <assert.h>
#include <math.h>
#if defined(HAVE_MPI)
#include <mpi.h>
#endif
/*----------------------------------------------------------------------------
* Local headers
*----------------------------------------------------------------------------*/
#include "cs_headers.h"
/*----------------------------------------------------------------------------*/
BEGIN_C_DECLS
/*----------------------------------------------------------------------------*/
cs_real_t
*
cs_meg_initialization
(
const
cs_zone_t
*
zone
,
const
char
*
field_name
)
{
cs_real_t
*
new_vals
=
NULL
;
/*-----------------------------------------------------------------------*/
/* User defined initialization for variable velocity over zone all_cells */
if
(
strcmp
(
zone
->
name
,
"all_cells"
)
==
0
&&
strcmp
(
field_name
,
"velocity"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
3
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
3
*
e_id
+
0
]
=
0
.
;
new_vals
[
3
*
e_id
+
1
]
=
0
.
;
new_vals
[
3
*
e_id
+
2
]
=
0
.
;
}
}
/*-----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* User defined initialization for variable thermal over zone all_cells */
if
(
strcmp
(
zone
->
name
,
"all_cells"
)
==
0
&&
strcmp
(
field_name
,
"thermal"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
e_id
]
=
293
.
15
;
}
}
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* User defined initialization for variable traceur over zone all_cells */
if
(
strcmp
(
zone
->
name
,
"all_cells"
)
==
0
&&
strcmp
(
field_name
,
"traceur"
)
==
0
)
{
const
int
vals_size
=
zone
->
n_elts
*
1
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
for
(
cs_lnum_t
e_id
=
0
;
e_id
<
zone
->
n_elts
;
e_id
++
)
{
cs_lnum_t
c_id
=
zone
->
elt_ids
[
e_id
];
new_vals
[
e_id
]
=
0
;
}
}
/*----------------------------------------------------------------------*/
/*------------------------------------------------------------------------*/
/* User defined initialization for variable velocity over zone dessus_rue */
if
(
strcmp
(
zone
->
name
,
"dessus_rue"
)
==
0
&&
strcmp
(
field_name
,
"velocity"
)
==
0
)
{
const
cs_real_3_t
*
xyz
=
(
cs_real_3_t
*
)
cs_glob_mesh_quantities
->
cell_cen
;
const
int
vals_size
=
zone
->
n_elts
*
3
;
BFT_MALLOC
(
new_vals
,
vals_size
,
cs_real_t
);
const
cs_real_t
H
=
cs_notebook_parameter_value_by_name
(
"H"
);
const
cs_real_t
zref
=
cs_notebook_parameter_value_by_name
(
"zref"
);
const
cs_real_t
Uref
=
cs_notebook_parameter_value_by_name