8.0
general documentation
cs_prototypes.h
Go to the documentation of this file.
1 #ifndef __CS_PROTOTYPES_H__
2 #define __CS_PROTOTYPES_H__
3 
4 /*============================================================================
5  * Prototypes for Fortran functions and subroutines callable from C
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2023 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_base.h"
35 #include "cs_domain.h"
36 #include "cs_field.h"
37 #include "cs_mesh.h"
38 #include "cs_mesh_quantities.h"
39 #include "cs_mesh_bad_cells.h"
40 #include "cs_probe.h"
41 #include "cs_time_control.h"
42 #include "cs_volume_zone.h"
43 
44 /*----------------------------------------------------------------------------*/
45 
47 
48 /*============================================================================
49  * Macro definitions
50  *============================================================================*/
51 
52 /*=============================================================================
53  * Fortran function/subroutine prototypes
54  *============================================================================*/
55 
56 /*----------------------------------------------------------------------------
57  * Main Fortran subroutine
58  *----------------------------------------------------------------------------*/
59 
60 extern void CS_PROCF (caltri, CALTRI)
61 (
62  void
63 );
64 
65 /*----------------------------------------------------------------------------
66  * Poisson equation resolution for hydrostatic pressure.
67  *----------------------------------------------------------------------------*/
68 
69 extern void cs_hydrostatic_pressure_compute(int *indhyd,
70  int iterns,
71  cs_real_t fext[][3],
72  cs_real_t dfext[][3],
73  cs_real_t phydr[],
74  cs_real_t flumas[],
75  cs_real_t flumab[],
76  cs_real_t viscf[],
77  cs_real_t viscb[],
78  cs_real_t dam[],
79  cs_real_t xam[],
80  cs_real_t dpvar[],
81  cs_real_t rhs[]);
82 
83 /*----------------------------------------------------------------------------
84  * Convert gas temperature to and from enthalpy based on concentrations
85  *----------------------------------------------------------------------------*/
86 
87 extern void CS_PROCF (cpthp1, CPTHP1)
88 (
89  const int *mode, /* <-- 1: h to t, 2: t to h */
90  cs_real_t *eh, /* <-> enthalpy of gas mix */
91  cs_real_t *xesp, /* <-- mas fraction of species */
92  cs_real_t *f1mc, /* <-- mean f1 */
93  cs_real_t *f2mc, /* <-- mean f2 */
94  cs_real_t *tp /* <-- gas temperature (K) */
95 );
96 
97 /*----------------------------------------------------------------------------
98  * Initialize Fortran base common block values
99  *----------------------------------------------------------------------------*/
100 
101 extern void CS_PROCF (csinit, CSINIT)
102 (
103  const int *irgpar, /* <-- MPI Rank in parallel, -1 otherwise */
104  const int *nrgpar /* <-- Number of MPI processes, or 1 */
105 );
106 
107 /*----------------------------------------------------------------------------
108  * Find the nearest cell's center from a node
109  *----------------------------------------------------------------------------*/
110 
111 extern void CS_PROCF (findpt, FINDPT)
112 (
113  const cs_lnum_t *ncelet, /* <-- number of extended (real + ghost) cells */
114  const cs_lnum_t *ncel, /* <-- number of cells */
115  const cs_real_t *xyzcen, /* <-- cell centers */
116  const cs_real_t *xx, /* <-- node coordinate X */
117  const cs_real_t *yy, /* <-- node coordinate Y */
118  const cs_real_t *zz, /* <-- node coordinate Z */
119  cs_lnum_t *node, /* --> node we are looking for, zero if error */
120  int *ndrang /* --> rank of associated process */
121 );
122 
123 /*----------------------------------------------------------------------------
124  * Main Fortran options initialization
125  *----------------------------------------------------------------------------*/
126 
127 extern void CS_PROCF (initi1, INITI1)
128 (
129  void
130 );
131 
132 /*----------------------------------------------------------------------------
133  * Add field indexes associated with a new non-user solved variable,
134  * with default options
135  *
136  * parameters:
137  * f_id <-- field id
138  *
139  * returns:
140  * scalar number for defined field
141  *----------------------------------------------------------------------------*/
142 
143 int
145 
146 /*----------------------------------------------------------------------------
147  * Add field indexes associated with a new solved thermal variable,
148  * with default options
149  *
150  * parameters:
151  * f_id <-- field id
152  *----------------------------------------------------------------------------*/
153 
154 void
156 
157 /*----------------------------------------------------------------------------*/
163 /*----------------------------------------------------------------------------*/
164 
165 int *
167 
168 /*----------------------------------------------------------------------------
169  * Computes the explicit chemical source term for atmospheric chemistry in
170  * case of a semi-coupled resolution
171  *----------------------------------------------------------------------------*/
172 
173 void
175  cs_real_t st_exp[],
176  cs_real_t st_imp[]);
177 
178 /*----------------------------------------------------------------------------*/
188 /*----------------------------------------------------------------------------*/
189 
190 void
192  const cs_lnum_t face_ids[],
193  const cs_real_t t[],
194  cs_real_t h[]);
195 
196 /*----------------------------------------------------------------------------*/
206 /*----------------------------------------------------------------------------*/
207 
208 void
209 cs_coal_thfieldconv1(int location_id,
210  const cs_real_t eh[],
211  cs_real_t tp[]);
212 
213 /*----------------------------------------------------------------------------*/
219 /*----------------------------------------------------------------------------*/
220 
221 cs_real_t *
223 
224 /*----------------------------------------------------------------------------*/
230 /*----------------------------------------------------------------------------*/
231 
232 cs_real_t *
234 
235 /*----------------------------------------------------------------------------*/
241 /*----------------------------------------------------------------------------*/
242 
243 cs_real_t *
245 
246 /*----------------------------------------------------------------------------*/
256 /*----------------------------------------------------------------------------*/
257 
258 void
260  const cs_lnum_t face_ids[],
261  const cs_real_t t[],
262  cs_real_t h[]);
263 
264 /*----------------------------------------------------------------------------*/
275 /*----------------------------------------------------------------------------*/
276 
277 cs_real_t
279  cs_real_t tp);
280 
281 /*----------------------------------------------------------------------------*/
292 /*----------------------------------------------------------------------------*/
293 
294 cs_real_t
296  cs_real_t eh);
297 
298 /*----------------------------------------------------------------------------*/
308 /*----------------------------------------------------------------------------*/
309 
310 void
311 cs_fuel_thfieldconv1(int location_id,
312  const cs_real_t eh[],
313  cs_real_t tp[]);
314 
315 /*----------------------------------------------------------------------------
316  * Return Lagrangian model status.
317  *
318  * parameters:
319  * model_flag --> 0 without Lagrangian, 1 or 2 with Lagrangian
320  * restart_flag --> 1 for Lagrangian restart, 0 otherwise
321  * frozen_flag --> 1 for frozen Eulerian flow, 0 otherwise
322  *----------------------------------------------------------------------------*/
323 
324 void
325 cs_lagr_status(int *model_flag,
326  int *restart_flag,
327  int *frozen_flag);
328 
329 /*----------------------------------------------------------------------------
330  * Exchange of coupling variables between tow instances
331  * of code_saturne thanks to cells.
332  *----------------------------------------------------------------------------*/
333 
334 void
336  cs_real_t st_exp[]);
337 
338 /*----------------------------------------------------------------------------
339  * Return condensation model metal structures metal surface.
340  *
341  * return:
342  * metal structures surface
343  *----------------------------------------------------------------------------*/
344 
345 double
347 
348 /*============================================================================
349  * User function prototypes
350  *============================================================================*/
351 
352 /*----------------------------------------------------------------------------
353  * Data Entry of the 1D wall thermal module.
354  *----------------------------------------------------------------------------*/
355 
356 void
357 cs_user_1d_wall_thermal(int iappel,
358  int isuit1);
359 
360 /*----------------------------------------------------------------------------
361  * Data Entry of the wall condensation module
362  *----------------------------------------------------------------------------*/
363 
364 void
366  int nscal,
367  int iappel);
368 
369 /*----------------------------------------------------------------------------
370  * Setup boundary conditions to be applied.
371  *----------------------------------------------------------------------------*/
372 
373 void
375 
376 /*----------------------------------------------------------------------------
377  * This function is called at each time step for boundary conditions.
378  *----------------------------------------------------------------------------*/
379 
380 void
382  int bc_type[]);
383 
384 /*----------------------------------------------------------------------------
385  * Boundary conditions for (Arbitrary Lagrangian Eulerian).
386  *----------------------------------------------------------------------------*/
387 
388 void
390  int bc_type[],
391  int ale_bc_type[],
392  int impale[]);
393 
394 /*----------------------------------------------------------------------------*/
406 /*----------------------------------------------------------------------------*/
407 
408 void
410 
411 /*----------------------------------------------------------------------------*/
420 /*----------------------------------------------------------------------------*/
421 
422 void
424 
425 /*----------------------------------------------------------------------------*/
434 /*----------------------------------------------------------------------------*/
435 
436 void
438 
439 /*----------------------------------------------------------------------------*/
462 /*----------------------------------------------------------------------------*/
463 
464 void
465 cs_user_fsi_structure_define(int is_restart,
466  int n_structs,
467  int *plot,
468  cs_time_control_t *plot_time_control,
469  cs_real_t *aexxst,
470  cs_real_t *bexxst,
471  cs_real_t *cfopre,
472  cs_real_t xstr0[][3],
473  cs_real_t vstr0[][3],
474  cs_real_t xstreq[][3]);
475 
476 /*----------------------------------------------------------------------------*/
491 /*----------------------------------------------------------------------------*/
492 
493 void
494 cs_user_fsi_structure_values(int n_structs,
495  const cs_time_step_t *ts,
496  const cs_real_t xstreq[][3],
497  const cs_real_t xstr[][3],
498  const cs_real_t vstr[][3],
499  cs_real_t xmstru[][3][3],
500  cs_real_t xcstru[][3][3],
501  cs_real_t xkstru[][3][3],
502  cs_real_t forstr[][3],
503  cs_real_t dtstr[]);
504 
505 /*----------------------------------------------------------------------------*/
518 /*----------------------------------------------------------------------------*/
519 
520 void
522  int structure_num[]);
523 
524 /*----------------------------------------------------------------------------*/
534 /*----------------------------------------------------------------------------*/
535 
536 void
537 cs_user_head_losses(const cs_zone_t *zone,
538  cs_real_t cku[][6]);
539 
540 /*----------------------------------------------------------------------------*/
546 /*----------------------------------------------------------------------------*/
547 
548 void
550 
551 /*----------------------------------------------------------------------------*/
557 /*----------------------------------------------------------------------------*/
558 
559 void
561 
562 /*----------------------------------------------------------------------------*/
571 /*----------------------------------------------------------------------------*/
572 
573 void
575 
576 /*----------------------------------------------------------------------------*/
585 /*----------------------------------------------------------------------------*/
586 
587 void
589 
590 /*----------------------------------------------------------------------------*/
596 /*----------------------------------------------------------------------------*/
597 
598 void
600 
601 /*----------------------------------------------------------------------------*/
619 /*----------------------------------------------------------------------------*/
620 
621 void
623  const cs_zone_t *z,
624  bool z_local,
625  const cs_real_t h[restrict],
626  cs_real_t t[restrict]);
627 
628 /*----------------------------------------------------------------------------*/
646 /*----------------------------------------------------------------------------*/
647 
648 void
650  const cs_zone_t *z,
651  bool z_local,
652  const cs_real_t t[restrict],
653  cs_real_t h[restrict]);
654 
655 /*----------------------------------------------------------------------------*/
678 /*----------------------------------------------------------------------------*/
679 
680 void
682 
683 /*----------------------------------------------------------------------------*/
702 /*----------------------------------------------------------------------------*/
703 
704 void
706  const cs_real_t mijlij[],
707  const cs_real_t mijmij[]);
708 
709 /*----------------------------------------------------------------------------*/
719 /*----------------------------------------------------------------------------*/
720 
721 void
723  int f_id,
724  cs_real_t *st_exp,
725  cs_real_t *st_imp);
726 
727 /*----------------------------------------------------------------------------*/
737 /*----------------------------------------------------------------------------*/
738 
739 void
741 
742 /*----------------------------------------------------------------------------
743  * Define mesh joinings.
744  *----------------------------------------------------------------------------*/
745 
746 void
747 cs_user_join(void);
748 
749 /*----------------------------------------------------------------------------
750  * Define linear solver options.
751  *
752  * This function is called at the setup stage, once user and most model-based
753  * fields are defined.
754  *----------------------------------------------------------------------------*/
755 
756 void
758 
759 /*----------------------------------------------------------------------------*/
765 /*----------------------------------------------------------------------------*/
766 
767 void
769 
770 /*----------------------------------------------------------------------------
771  * Tag bad cells within the mesh based on geometric criteria.
772  *----------------------------------------------------------------------------*/
773 
774 void
776  cs_mesh_quantities_t *mesh_quantities);
777 
778 /*----------------------------------------------------------------------------
779  * Define mesh files to read and optional associated transformations.
780  *----------------------------------------------------------------------------*/
781 
782 void
783 cs_user_mesh_input(void);
784 
785 /*----------------------------------------------------------------------------
786  * Modifiy geometry and mesh.
787  *----------------------------------------------------------------------------*/
788 
789 void
791 
792 /*----------------------------------------------------------------------------
793  * Insert boundary wall into a mesh.
794  *----------------------------------------------------------------------------*/
795 
796 void
798 
799 /*----------------------------------------------------------------------------
800  * Mesh smoothing.
801  *
802  * parameters:
803  * mesh <-> pointer to mesh structure to smoothe
804  *----------------------------------------------------------------------------*/
805 
806 void
808 
809 /*----------------------------------------------------------------------------
810  * Enable or disable mesh saving.
811  *
812  * By default, mesh is saved when modified.
813  *
814  * parameters:
815  * mesh <-> pointer to mesh structure
816  *----------------------------------------------------------------------------*/
817 
818 void
820 
821 /*----------------------------------------------------------------------------
822  * Set options for cutting of warped faces
823  *
824  * parameters:
825  * mesh <-> pointer to mesh structure to smoothe
826  *----------------------------------------------------------------------------*/
827 
828 void
830 
831 /*----------------------------------------------------------------------------*/
839 /*----------------------------------------------------------------------------*/
840 
841 void
843  cs_mesh_quantities_t *mesh_quantities);
844 
845 /*----------------------------------------------------------------------------*/
849 /*----------------------------------------------------------------------------*/
850 
851 void
853 
854 /*----------------------------------------------------------------------------
855  * Select physical model options, including user fields.
856  *
857  * This function is called at the earliest stages of the data setup.
858  *----------------------------------------------------------------------------*/
859 
860 void
861 cs_user_model(void);
862 
863 /*----------------------------------------------------------------------------
864  * Define advanced mesh numbering options.
865  *----------------------------------------------------------------------------*/
866 
867 void
868 cs_user_numbering(void);
869 
870 /*----------------------------------------------------------------------------
871  * Define parallel IO settings.
872  *----------------------------------------------------------------------------*/
873 
874 void
875 cs_user_parallel_io(void);
876 
877 /*----------------------------------------------------------------------------
878  * Define advanced partitioning options.
879  *----------------------------------------------------------------------------*/
880 
881 void
882 cs_user_partition(void);
883 
884 /*----------------------------------------------------------------------------
885  * Define sparse matrix tuning options.
886  *----------------------------------------------------------------------------*/
887 
888 void
890 
891 /*----------------------------------------------------------------------------
892  * Define or modify general numerical and physical user parameters.
893  *
894  * At the calling point of this function, most model-related most variables
895  * and other fields have been defined, so specific settings related to those
896  * fields may be set here.
897  *----------------------------------------------------------------------------*/
898 
899 void
901 
902 /*----------------------------------------------------------------------------
903  * User function for input of radiative transfer module options.
904  *----------------------------------------------------------------------------*/
905 
906 void
908 
909 /*-----------------------------------------------------------------------------
910  * User subroutine for input of radiative transfer boundary conditions
911  *----------------------------------------------------------------------------*/
912 
913 void
915  const int bc_type[],
916  int isothp[],
917  cs_real_t *tmin,
918  cs_real_t *tmax,
919  cs_real_t *tx,
920  const cs_real_t dt[],
921  const cs_real_t thwall[],
922  const cs_real_t qincid[],
923  cs_real_t hfcnvp[],
924  cs_real_t flcnvp[],
925  cs_real_t xlamp[],
926  cs_real_t epap[],
927  cs_real_t epsp[],
928  cs_real_t textp[]);
929 
930 /*----------------------------------------------------------------------------
931  * Define periodic faces.
932  *----------------------------------------------------------------------------*/
933 
934 void
935 cs_user_periodicity(void);
936 
937 /*----------------------------------------------------------------------------
938  * Define post-processing writers.
939  *
940  * The default output format and frequency may be configured, and additional
941  * post-processing writers allowing outputs in different formats or with
942  * different format options and output frequency than the main writer may
943  * be defined.
944  *----------------------------------------------------------------------------*/
945 
946 void
948 
949 /*-----------------------------------------------------------------------------
950  * Define monitoring probes and profiles. A profile is seen as a set of probes.
951  *----------------------------------------------------------------------------*/
952 
953 void
955 
956 /*----------------------------------------------------------------------------
957  * Define post-processing meshes.
958  *
959  * The main post-processing meshes may be configured, and additional
960  * post-processing meshes may be defined as a subset of the main mesh's
961  * cells or faces (both interior and boundary).
962  *----------------------------------------------------------------------------*/
963 
964 void
966 
967 /*----------------------------------------------------------------------------
968  * User function for output of values on a post-processing mesh.
969  *----------------------------------------------------------------------------*/
970 
971 void
972 cs_user_postprocess_values(const char *mesh_name,
973  int mesh_id,
974  int cat_id,
975  cs_probe_set_t *probes,
976  cs_lnum_t n_cells,
977  cs_lnum_t n_i_faces,
978  cs_lnum_t n_b_faces,
979  cs_lnum_t n_vertices,
980  const cs_lnum_t cell_list[],
981  const cs_lnum_t i_face_list[],
982  const cs_lnum_t b_face_list[],
983  const cs_lnum_t vertex_list[],
984  const cs_time_step_t *ts);
985 
986 /*----------------------------------------------------------------------------
987  * Override default frequency or calculation end based output.
988  *
989  * This allows fine-grained control of activation or deactivation,
990  *
991  * parameters:
992  * nt_max_abs <-- maximum time step number
993  * nt_cur_abs <-- current time step number
994  * t_cur_abs <-- absolute time at the current time step
995  *----------------------------------------------------------------------------*/
996 
997 void
998 cs_user_postprocess_activate(int nt_max_abs,
999  int nt_cur_abs,
1000  double t_cur_abs);
1001 
1002 /*----------------------------------------------------------------------------
1003  * Absorption coefficient for radiative module
1004  *----------------------------------------------------------------------------*/
1005 
1006 void
1007 cs_user_rad_transfer_absorption(const int bc_type[],
1008  cs_real_t ck[]);
1009 
1010 /*----------------------------------------------------------------------------
1011  * Compute the net radiation flux
1012  *----------------------------------------------------------------------------*/
1013 
1014 void
1016  const cs_real_t coefap[],
1017  const cs_real_t coefbp[],
1018  const cs_real_t cofafp[],
1019  const cs_real_t cofbfp[],
1020  const cs_real_t twall[],
1021  const cs_real_t qincid[],
1022  const cs_real_t xlam[],
1023  const cs_real_t epa[],
1024  const cs_real_t eps[],
1025  const cs_real_t ck[],
1026  cs_real_t net_flux[]);
1027 
1028 /*----------------------------------------------------------------------------
1029  * Set user solver.
1030  *----------------------------------------------------------------------------*/
1031 
1032 int
1033 cs_user_solver_set(void);
1034 
1035 /*----------------------------------------------------------------------------
1036  * Main call to user solver.
1037  *----------------------------------------------------------------------------*/
1038 
1039 void
1041  const cs_mesh_quantities_t *mesh_quantities);
1042 
1043 /*----------------------------------------------------------------------------
1044  * Define couplings with other instances of code_saturne.
1045  *----------------------------------------------------------------------------*/
1046 
1047 void
1049 
1050 /*----------------------------------------------------------------------------
1051  * Define couplings with SYRTHES code.
1052  *----------------------------------------------------------------------------*/
1053 
1054 void
1056 
1057 /*----------------------------------------------------------------------------*/
1067 /*----------------------------------------------------------------------------*/
1068 
1069 void
1070 cs_user_syrthes_coupling_volume_h(int coupling_id,
1071  const char *syrthes_name,
1072  cs_lnum_t n_elts,
1073  const cs_lnum_t elt_ids[],
1074  cs_real_t h_vol[]);
1075 
1076 /*----------------------------------------------------------------------------
1077  * Define couplings with CATHARE code.
1078  *----------------------------------------------------------------------------*/
1079 
1080 void
1082 
1083 /*----------------------------------------------------------------------------
1084  * Define time moments.
1085  *----------------------------------------------------------------------------*/
1086 
1087 void
1088 cs_user_time_moments(void);
1089 
1090 
1091 /*----------------------------------------------------------------------------
1092  * Define time tables.
1093  *----------------------------------------------------------------------------*/
1094 
1095 void
1096 cs_user_time_table(void);
1097 
1098 /*----------------------------------------------------------------------------
1099  * Define rotor/stator model.
1100  *----------------------------------------------------------------------------*/
1101 
1102 void
1104 
1105 /*----------------------------------------------------------------------------
1106  * Define rotor axes, associated cells, and rotor/stator faces.
1107  *----------------------------------------------------------------------------*/
1108 
1109 void
1111 
1112 /*----------------------------------------------------------------------------
1113  * Define rotation velocity of rotor.
1114  *----------------------------------------------------------------------------*/
1115 
1116 void
1118 
1119 /*----------------------------------------------------------------------------*/
1123 /*----------------------------------------------------------------------------*/
1124 
1125 void
1126 cs_user_zones(void);
1127 
1128 /*----------------------------------------------------------------------------*/
1132 /*----------------------------------------------------------------------------*/
1133 
1134 void
1136  const cs_mesh_quantities_t *mesh_quantities,
1137  cs_real_t *dt);
1138 
1139 /*----------------------------------------------------------------------------
1140  * Computation of the relaxation time-scale to equilibrium in the frame of
1141  * the homogeneous two-phase model.
1142  *----------------------------------------------------------------------------*/
1143 
1144 void
1146  const cs_real_t *alpha_eq,
1147  const cs_real_t *y_eq,
1148  const cs_real_t *z_eq,
1149  const cs_real_t *ei,
1150  const cs_real_t *v,
1151  cs_real_t *relax_tau);
1152 
1153 /*----------------------------------------------------------------------------*/
1157 /*----------------------------------------------------------------------------*/
1158 
1159 void
1161 
1162 /*----------------------------------------------------------------------------*/
1166 /*----------------------------------------------------------------------------*/
1167 
1168 void
1170 
1171 /*----------------------------------------------------------------------------*/
1175 /*----------------------------------------------------------------------------*/
1176 
1177 void
1179 
1180 /*----------------------------------------------------------------------------*/
1181 
1183 
1184 #endif /* __CS_PROTOTYPES_H__ */
#define restrict
Definition: cs_defs.h:139
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define CS_PROCF(x, y)
Definition: cs_defs.h:523
#define END_C_DECLS
Definition: cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
@ t
Definition: cs_field_pointer.h:92
@ xlam
Definition: cs_field_pointer.h:183
@ eps
Definition: cs_field_pointer.h:71
@ h
Definition: cs_field_pointer.h:91
@ epa
Definition: cs_field_pointer.h:184
@ dt
Definition: cs_field_pointer.h:65
struct _cs_probe_set_t cs_probe_set_t
Definition: cs_probe.h:53
void cs_user_postprocess_meshes(void)
Define post-processing meshes.
Definition: cs_user_postprocess.c:86
void cs_user_rad_transfer_absorption(const int bc_type[], cs_real_t ck[])
Absorption coefficient for radiative module.
Definition: cs_user_radiative_transfer.c:103
void cs_coal_bt2h(cs_lnum_t n_faces, const cs_lnum_t face_ids[], const cs_real_t t[], cs_real_t h[])
Convert temperature to enthalpy at boundary for coal combustion.
void cs_user_mesh_bad_cells_tag(cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities)
Tag bad cells within the mesh based on user-defined geometric criteria.
Definition: cs_user_mesh.c:199
void cs_user_wall_condensation(int nvar, int nscal, int iappel)
Source terms associated at the boundary faces and the neighboring cells with surface condensation.
Definition: cs_user_wall_condensation.c:169
void cs_user_mesh_boundary(cs_mesh_t *mesh)
Insert boundaries into a mesh.
Definition: cs_user_mesh.c:136
void cs_user_zones(void)
Define volume and surface zones.
Definition: cs_user_zones.c:65
void cs_user_model(void)
Select physical model options, including user fields.
Definition: cs_user_parameters.c:84
void cs_add_model_thermal_field_indexes(int f_id)
void cs_user_join(void)
Define mesh joinings.
Definition: cs_user_mesh.c:95
void cs_user_extra_operations_finalize(cs_domain_t *domain)
This function is called at the end of the calculation.
Definition: cs_user_extra_operations.c:122
void cs_lagr_status(int *model_flag, int *restart_flag, int *frozen_flag)
int * cs_atmo_get_auto_flag(void)
Return pointer to automatic face bc flag array.
void cs_user_internal_coupling(void)
Define internal coupling options.
Definition: cs_user_parameters.c:162
void cs_user_extra_operations(cs_domain_t *domain)
This function is called at the end of each time step.
Definition: cs_user_extra_operations.c:104
void cs_fuel_bt2h(cs_lnum_t n_faces, const cs_lnum_t face_ids[], const cs_real_t t[], cs_real_t h[])
Convert temperature to enthalpy at boundary for fuel combustion.
void cs_user_syrthes_coupling_volume_h(int coupling_id, const char *syrthes_name, cs_lnum_t n_elts, const cs_lnum_t elt_ids[], cs_real_t h_vol[])
Compute a volume exchange coefficient for SYRTHES couplings.
Definition: cs_user_coupling.c:114
void cs_user_syrthes_coupling(void)
Define couplings with SYRTHES code.
Definition: cs_user_coupling.c:95
void cs_user_parameters(cs_domain_t *domain)
Define or modify general numerical and physical user parameters.
Definition: cs_user_parameters.c:107
void cs_user_boundary_conditions_ale(cs_domain_t *domain, int bc_type[], int ale_bc_type[], int impale[])
User definition of boundary conditions for ALE.
Definition: cs_user_boundary_conditions.c:179
void cs_user_physical_properties_td_pressure(cs_real_t *td_p)
User function to define a custom law for the thermodynamic pressure.
Definition: cs_user_physical_properties.c:202
void cs_user_boundary_conditions_setup(cs_domain_t *domain)
Set boundary conditions to be applied.
Definition: cs_user_boundary_conditions.c:79
void cs_user_turbomachinery_rotor(void)
Define rotor axes, associated cells, and rotor/stator faces.
Definition: cs_user_turbomachinery.c:90
void cs_user_turbomachinery_set_rotation_velocity(void)
Define rotation velocity of rotor.
Definition: cs_user_turbomachinery.c:103
void cs_user_postprocess_activate(int nt_max_abs, int nt_cur_abs, double t_cur_abs)
Definition: cs_user_postprocess.c:177
void cs_user_linear_solvers(void)
Define linear solver options.
Definition: cs_user_parameters.c:130
cs_real_t cs_fuel_h2t_gas(cs_real_t xesp[], cs_real_t eh)
Calculation of the gas temperature from enthalpy and concentrations for fuel combustion.
cs_real_t * cs_get_b_head_loss(void)
Return pointer to boundary head losses array.
void cs_user_periodicity(void)
Define periodic faces.
Definition: cs_user_mesh.c:108
void findpt(const cs_lnum_t *ncelet, const cs_lnum_t *ncel, const cs_real_t *xyzcen, const cs_real_t *xx, const cs_real_t *yy, const cs_real_t *zz, cs_lnum_t *node, int *ndrang)
void initi1(void)
Definition: initi1.f90:29
void cs_user_internal_coupling_from_disjoint_meshes(cs_mesh_t *mesh)
Define volumesi from separated meshes as internal coupling zones.
Definition: cs_internal_coupling.c:3161
void cs_user_scaling_elec(const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities, cs_real_t *dt)
Define scaling parameter for electric model.
Definition: cs_user_electric_scaling.c:75
cs_real_t cs_fuel_t2h_gas(cs_real_t xesp[], cs_real_t tp)
Calculation of the gas enthalpy from temperature and concentrations for fuel combustion.
void cs_user_mesh_cartesian_define(void)
Define a cartesian mesh.
Definition: cs_user_mesh.c:233
void cs_coal_thfieldconv1(int location_id, const cs_real_t eh[], cs_real_t tp[])
Calculation of the gas temperature Function with the gas enthalpy and concentrations.
void cs_user_mesh_modify(cs_mesh_t *mesh)
Modify geometry and mesh.
Definition: cs_user_mesh.c:151
void cs_user_fsi_structure_num(cs_domain_t *domain, int structure_num[])
Define structure numbers for faces associated with internal or external (code_aster) structures.
Definition: cs_user_fluid_structure_interaction.c:174
void cs_user_radiative_transfer_bcs(cs_domain_t *domain, const int bc_type[], int isothp[], cs_real_t *tmin, cs_real_t *tmax, cs_real_t *tx, const cs_real_t dt[], const cs_real_t thwall[], const cs_real_t qincid[], cs_real_t hfcnvp[], cs_real_t flcnvp[], cs_real_t xlamp[], cs_real_t epap[], cs_real_t epsp[], cs_real_t textp[])
User definition of radiative transfer boundary conditions.
Definition: cs_user_radiative_transfer_bcs.c:124
void cs_user_postprocess_probes(void)
Define monitoring probes and profiles.
Definition: cs_user_postprocess.c:101
void cs_user_numbering(void)
Define advanced mesh numbering options.
Definition: cs_user_performance_tuning.c:74
void cs_user_1d_wall_thermal(int iappel, int isuit1)
Definition: cs_user_1d_wall_thermal.c:82
void cs_user_physical_properties_h_to_t(cs_domain_t *domain, const cs_zone_t *z, bool z_local, const cs_real_t h[restrict], cs_real_t t[restrict])
User definition of enthalpy to temperature conversion.
void cs_user_fsi_structure_values(int n_structs, const cs_time_step_t *ts, const cs_real_t xstreq[][3], const cs_real_t xstr[][3], const cs_real_t vstr[][3], cs_real_t xmstru[][3][3], cs_real_t xcstru[][3][3], cs_real_t xkstru[][3][3], cs_real_t forstr[][3], cs_real_t dtstr[])
Time-based settings for internal mobile structures.
Definition: cs_user_fluid_structure_interaction.c:134
void cs_user_time_moments(void)
Define time moments.
Definition: cs_user_parameters.c:147
double cs_tagms_s_metal(void)
void cs_atmo_chem_source_terms(int iscal, cs_real_t st_exp[], cs_real_t st_imp[])
void cs_sat_coupling_exchange_at_cells(int f_id, cs_real_t st_exp[])
void cs_fuel_thfieldconv1(int location_id, const cs_real_t eh[], cs_real_t tp[])
Calculation of the gas temperature Function with the gas enthalpy and concentrations.
void cs_user_radiative_transfer_parameters(void)
User function for input of radiative transfer module options.
Definition: cs_user_radiative_transfer.c:77
int cs_user_solver_set(void)
Set user solver.
Definition: cs_user_solver.c:75
void cs_user_mesh_input(void)
Define mesh files to read and optional associated transformations.
Definition: cs_user_mesh.c:82
void cs_user_time_table(void)
Define time tables using C API. This function is called at the begin of the simulation only.
Definition: cs_user_time_table.c:77
int cs_add_model_field_indexes(int f_id)
void cs_user_physical_properties_smagorinsky_c(cs_domain_t *domain, const cs_real_t mijlij[], const cs_real_t mijmij[])
User modification of the Smagorinsky constant for the dynamic Smagorinsky model.
Definition: cs_user_physical_properties.c:167
void cs_user_mesh_save(cs_mesh_t *mesh)
Enable or disable mesh saving.
Definition: cs_user_mesh.c:183
void cs_user_porosity(cs_domain_t *domain)
Compute the porosity (volume factor when the porosity model is activated. (cs_glob_porous_model > 0)...
Definition: cs_user_porosity.c:80
void cs_user_source_terms(cs_domain_t *domain, int f_id, cs_real_t *st_exp, cs_real_t *st_imp)
Additional user-defined source terms for variable equations (momentum, scalars, turbulence....
Definition: cs_user_source_terms.c:155
void cs_user_postprocess_values(const char *mesh_name, int mesh_id, int cat_id, cs_probe_set_t *probes, cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, cs_lnum_t n_vertices, const cs_lnum_t cell_list[], const cs_lnum_t i_face_list[], const cs_lnum_t b_face_list[], const cs_lnum_t vertex_list[], const cs_time_step_t *ts)
User function for output of values on a post-processing mesh.
Definition: cs_user_postprocess.c:134
void cs_user_matrix_tuning(void)
Define sparse matrix tuning options.
Definition: cs_user_performance_tuning.c:113
void cs_user_paramedmem_define_fields(void)
Define fields to couple with ParaMEDMEM.
Definition: cs_user_paramedmem_coupling.c:108
void cs_user_internal_coupling_add_volumes(cs_mesh_t *mesh)
Define volumes as internal coupling zones.
Definition: cs_internal_coupling.c:3142
void cs_user_mesh_modify_partial(cs_mesh_t *mesh, cs_mesh_quantities_t *mesh_quantities)
Apply partial modifications to the mesh after the preprocessing and initial postprocessing mesh build...
Definition: cs_user_mesh.c:218
void cs_user_physical_properties(cs_domain_t *domain)
This function is called each time step to define physical properties.
Definition: cs_user_physical_properties.c:75
cs_real_t * cs_get_cavitation_gam(void)
Return pointer to cavitation "gamcav" array.
void cs_user_head_losses(const cs_zone_t *zone, cs_real_t cku[][6])
Compute GUI-defined head losses for a given volume zone.
Definition: cs_user_head_losses.c:86
void cs_user_fsi_structure_define(int is_restart, int n_structs, int *plot, cs_time_control_t *plot_time_control, cs_real_t *aexxst, cs_real_t *bexxst, cs_real_t *cfopre, cs_real_t xstr0[][3], cs_real_t vstr0[][3], cs_real_t xstreq[][3])
Definition of internal mobile structures and corresponding initial conditions (initial displacement a...
Definition: cs_user_fluid_structure_interaction.c:92
void cs_user_solver(const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities)
Main call to user solver.
Definition: cs_user_solver.c:92
cs_real_t * cs_get_cavitation_dgdp_st(void)
Return pointer to cavitation "dgdpca" array.
void cs_user_postprocess_writers(void)
Define post-processing writers.
Definition: cs_user_postprocess.c:69
void cs_user_boundary_conditions(cs_domain_t *domain, int bc_type[])
User definition of boundary conditions.
Definition: cs_user_boundary_conditions.c:125
void cs_user_mesh_smoothe(cs_mesh_t *mesh)
Mesh smoothing.
Definition: cs_user_mesh.c:166
void cs_user_initialization(cs_domain_t *domain)
This function is called one time step to initialize problem.
Definition: cs_user_initialization.c:88
void cs_user_extra_operations_initialize(cs_domain_t *domain)
Initialize variables.
Definition: cs_user_extra_operations.c:86
void cs_user_cathare_coupling(void)
Define couplings with SYRTHES code.
Definition: cs_user_coupling.c:138
void caltri(void)
Definition: caltri.f90:36
void csinit(const int *irgpar, const int *nrgpar)
void cs_user_paramedmem_define_couplings(void)
Define ParaMEDMEM coupling(s)
Definition: cs_user_paramedmem_coupling.c:82
void cs_user_hgn_thermo_relax_time(const cs_mesh_t *mesh, const cs_real_t *alpha_eq, const cs_real_t *y_eq, const cs_real_t *z_eq, const cs_real_t *ei, const cs_real_t *v, cs_real_t *relax_tau)
Computation of the relaxation time-scale.
Definition: cs_user_hgn.c:82
void cs_user_mesh_warping(void)
Set options for cutting of warped faces.
Definition: cs_user_mesh.c:121
void cs_user_partition(void)
Define advanced partitioning options.
Definition: cs_user_performance_tuning.c:87
void cs_hydrostatic_pressure_compute(int *indhyd, int iterns, cs_real_t fext[][3], cs_real_t dfext[][3], cs_real_t phydr[], cs_real_t flumas[], cs_real_t flumab[], cs_real_t viscf[], cs_real_t viscb[], cs_real_t dam[], cs_real_t xam[], cs_real_t dpvar[], cs_real_t rhs[])
void cs_user_physical_properties_t_to_h(cs_domain_t *domain, const cs_zone_t *z, bool z_local, const cs_real_t t[restrict], cs_real_t h[restrict])
User definition of temperature to enthalpy conversion.
void cs_user_parallel_io(void)
Define parallel IO settings.
Definition: cs_user_performance_tuning.c:100
void cs_user_paramedmem_define_meshes(void)
Define coupled meshes.
Definition: cs_user_paramedmem_coupling.c:95
void cs_user_finalize_setup(cs_domain_t *domain)
Define or modify output user parameters. For CDO schemes, specify the elements such as properties,...
Definition: cs_user_parameters.c:180
void cs_user_rad_transfer_net_flux(const int itypfb[], const cs_real_t coefap[], const cs_real_t coefbp[], const cs_real_t cofafp[], const cs_real_t cofbfp[], const cs_real_t twall[], const cs_real_t qincid[], const cs_real_t xlam[], const cs_real_t epa[], const cs_real_t eps[], const cs_real_t ck[], cs_real_t net_flux[])
Compute the net radiation flux.
Definition: cs_user_radiative_transfer.c:141
void cs_user_saturne_coupling(void)
Define couplings with other instances of code_saturne.
Definition: cs_user_coupling.c:79
void cs_user_turbomachinery(void)
Define rotor/stator model.
Definition: cs_user_turbomachinery.c:77
void cpthp1(const int *mode, cs_real_t *eh, cs_real_t *xesp, cs_real_t *f1mc, cs_real_t *f2mc, cs_real_t *tp)
integer, dimension(:), allocatable impale
indicator of imposed displacement
Definition: albase.f90:61
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:114
integer, dimension(:), pointer, save itypfb
boundary condition type at the boundary face ifac (see cs_user_boundary_conditions)
Definition: pointe.f90:100
integer, save nscal
number of solved user scalars effective number of scalars solutions of an advection equation,...
Definition: dimens.f90:55
integer, save nvar
number of solved variables (must be lower than nvarmx)
Definition: dimens.f90:42
integer, save ncelet
number of extended (real + ghost of the 'halo') cells. See Note 1: ghost cells - (halos)
Definition: mesh.f90:46
double precision, dimension(:,:), pointer xyzcen
coordinate of the cell centers
Definition: mesh.f90:110
integer, save ncel
number of real cells in the mesh
Definition: mesh.f90:50
integer, save isuit1
For the 1D wall thermal module, activation (1) or not(0) of the reading of the mesh and of the wall t...
Definition: optcal.f90:174
Definition: mesh.f90:26
Structure storing the main features of the computational domain and pointers to the main geometrical ...
Definition: cs_domain.h:138
Definition: cs_mesh_quantities.h:92
Definition: cs_mesh.h:85
Definition: cs_time_control.h:96
time step descriptor
Definition: cs_time_step.h:64
Definition: cs_zone.h:55