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 /*----------------------------------------------------------------------------*/
138 /*----------------------------------------------------------------------------*/
139 
140 int *
142 
143 /*----------------------------------------------------------------------------
144  * Add field indexes associated with a new non-user solved variable,
145  * with default options
146  *
147  * parameters:
148  * f_id <-- field id
149  *
150  * returns:
151  * scalar number for defined field
152  *----------------------------------------------------------------------------*/
153 
154 int
156 
157 /*----------------------------------------------------------------------------
158  * Add field indexes associated with a new solved thermal variable,
159  * with default options
160  *
161  * parameters:
162  * f_id <-- field id
163  *----------------------------------------------------------------------------*/
164 
165 void
167 
168 /*----------------------------------------------------------------------------*/
178 /*----------------------------------------------------------------------------*/
179 
180 void
182  const cs_lnum_t face_ids[],
183  const cs_real_t t[],
184  cs_real_t h[]);
185 
186 /*----------------------------------------------------------------------------*/
196 /*----------------------------------------------------------------------------*/
197 
198 void
199 cs_coal_thfieldconv1(int location_id,
200  const cs_real_t eh[],
201  cs_real_t tp[]);
202 
203 /*----------------------------------------------------------------------------*/
209 /*----------------------------------------------------------------------------*/
210 
211 cs_real_t *
213 
214 /*----------------------------------------------------------------------------*/
220 /*----------------------------------------------------------------------------*/
221 
222 cs_real_t *
224 
225 /*----------------------------------------------------------------------------*/
231 /*----------------------------------------------------------------------------*/
232 
233 cs_real_t *
235 
236 /*----------------------------------------------------------------------------*/
246 /*----------------------------------------------------------------------------*/
247 
248 void
250  const cs_lnum_t face_ids[],
251  const cs_real_t t[],
252  cs_real_t h[]);
253 
254 /*----------------------------------------------------------------------------*/
265 /*----------------------------------------------------------------------------*/
266 
267 cs_real_t
269  cs_real_t tp);
270 
271 /*----------------------------------------------------------------------------*/
282 /*----------------------------------------------------------------------------*/
283 
284 cs_real_t
286  cs_real_t eh);
287 
288 /*----------------------------------------------------------------------------*/
298 /*----------------------------------------------------------------------------*/
299 
300 void
301 cs_fuel_thfieldconv1(int location_id,
302  const cs_real_t eh[],
303  cs_real_t tp[]);
304 
305 /*----------------------------------------------------------------------------
306  * Return Lagrangian model status.
307  *
308  * parameters:
309  * model_flag --> 0 without Lagrangian, 1 or 2 with Lagrangian
310  * restart_flag --> 1 for Lagrangian restart, 0 otherwise
311  * frozen_flag --> 1 for frozen Eulerian flow, 0 otherwise
312  *----------------------------------------------------------------------------*/
313 
314 void
315 cs_lagr_status(int *model_flag,
316  int *restart_flag,
317  int *frozen_flag);
318 
319 /*----------------------------------------------------------------------------
320  * Return condensation model metal structures metal surface.
321  *
322  * return:
323  * metal structures surface
324  *----------------------------------------------------------------------------*/
325 
326 double
328 
329 /*============================================================================
330  * User function prototypes
331  *============================================================================*/
332 
333 /*----------------------------------------------------------------------------
334  * Data Entry of the 1D wall thermal module.
335  *----------------------------------------------------------------------------*/
336 
337 void
338 cs_user_1d_wall_thermal(int iappel,
339  int isuit1);
340 
341 /*----------------------------------------------------------------------------
342  * Data Entry of the wall condensation module
343  *----------------------------------------------------------------------------*/
344 
345 void
347  int nscal,
348  int iappel);
349 
350 /*----------------------------------------------------------------------------
351  * Setup boundary conditions to be applied.
352  *----------------------------------------------------------------------------*/
353 
354 void
356 
357 /*----------------------------------------------------------------------------
358  * This function is called at each time step for boundary conditions.
359  *----------------------------------------------------------------------------*/
360 
361 void
363  int bc_type[]);
364 
365 /*----------------------------------------------------------------------------
366  * Boundary conditions for (Arbitrary Lagrangian Eulerian).
367  *----------------------------------------------------------------------------*/
368 
369 void
371  int bc_type[],
372  int ale_bc_type[],
373  int impale[]);
374 
375 /*----------------------------------------------------------------------------*/
387 /*----------------------------------------------------------------------------*/
388 
389 void
391 
392 /*----------------------------------------------------------------------------*/
401 /*----------------------------------------------------------------------------*/
402 
403 void
405 
406 /*----------------------------------------------------------------------------*/
415 /*----------------------------------------------------------------------------*/
416 
417 void
419 
420 /*----------------------------------------------------------------------------*/
443 /*----------------------------------------------------------------------------*/
444 
445 void
446 cs_user_fsi_structure_define(int is_restart,
447  int n_structs,
448  int *plot,
449  cs_time_control_t *plot_time_control,
450  cs_real_t *aexxst,
451  cs_real_t *bexxst,
452  cs_real_t *cfopre,
453  cs_real_t xstr0[][3],
454  cs_real_t vstr0[][3],
455  cs_real_t xstreq[][3]);
456 
457 /*----------------------------------------------------------------------------*/
472 /*----------------------------------------------------------------------------*/
473 
474 void
475 cs_user_fsi_structure_values(int n_structs,
476  const cs_time_step_t *ts,
477  const cs_real_t xstreq[][3],
478  const cs_real_t xstr[][3],
479  const cs_real_t vstr[][3],
480  cs_real_t xmstru[][3][3],
481  cs_real_t xcstru[][3][3],
482  cs_real_t xkstru[][3][3],
483  cs_real_t forstr[][3],
484  cs_real_t dtstr[]);
485 
486 /*----------------------------------------------------------------------------*/
499 /*----------------------------------------------------------------------------*/
500 
501 void
503  int structure_num[]);
504 
505 /*----------------------------------------------------------------------------*/
515 /*----------------------------------------------------------------------------*/
516 
517 void
518 cs_user_head_losses(const cs_zone_t *zone,
519  cs_real_t cku[][6]);
520 
521 /*----------------------------------------------------------------------------*/
527 /*----------------------------------------------------------------------------*/
528 
529 void
531 
532 /*----------------------------------------------------------------------------*/
538 /*----------------------------------------------------------------------------*/
539 
540 void
542 
543 /*----------------------------------------------------------------------------*/
552 /*----------------------------------------------------------------------------*/
553 
554 void
556 
557 /*----------------------------------------------------------------------------*/
566 /*----------------------------------------------------------------------------*/
567 
568 void
570 
571 /*----------------------------------------------------------------------------*/
577 /*----------------------------------------------------------------------------*/
578 
579 void
581 
582 /*----------------------------------------------------------------------------*/
600 /*----------------------------------------------------------------------------*/
601 
602 void
604  const cs_zone_t *z,
605  bool z_local,
606  const cs_real_t h[restrict],
607  cs_real_t t[restrict]);
608 
609 /*----------------------------------------------------------------------------*/
627 /*----------------------------------------------------------------------------*/
628 
629 void
631  const cs_zone_t *z,
632  bool z_local,
633  const cs_real_t t[restrict],
634  cs_real_t h[restrict]);
635 
636 /*----------------------------------------------------------------------------*/
659 /*----------------------------------------------------------------------------*/
660 
661 void
663 
664 /*----------------------------------------------------------------------------*/
683 /*----------------------------------------------------------------------------*/
684 
685 void
687  const cs_real_t mijlij[],
688  const cs_real_t mijmij[]);
689 
690 /*----------------------------------------------------------------------------*/
700 /*----------------------------------------------------------------------------*/
701 
702 void
704  int f_id,
705  cs_real_t *st_exp,
706  cs_real_t *st_imp);
707 
708 /*----------------------------------------------------------------------------*/
718 /*----------------------------------------------------------------------------*/
719 
720 void
722 
723 /*----------------------------------------------------------------------------
724  * Define mesh joinings.
725  *----------------------------------------------------------------------------*/
726 
727 void
728 cs_user_join(void);
729 
730 /*----------------------------------------------------------------------------
731  * Define linear solver options.
732  *
733  * This function is called at the setup stage, once user and most model-based
734  * fields are defined.
735  *----------------------------------------------------------------------------*/
736 
737 void
739 
740 /*----------------------------------------------------------------------------*/
746 /*----------------------------------------------------------------------------*/
747 
748 void
750 
751 /*----------------------------------------------------------------------------
752  * Tag bad cells within the mesh based on geometric criteria.
753  *----------------------------------------------------------------------------*/
754 
755 void
757  cs_mesh_quantities_t *mesh_quantities);
758 
759 /*----------------------------------------------------------------------------
760  * Define mesh files to read and optional associated transformations.
761  *----------------------------------------------------------------------------*/
762 
763 void
764 cs_user_mesh_input(void);
765 
766 /*----------------------------------------------------------------------------
767  * Modifiy geometry and mesh.
768  *----------------------------------------------------------------------------*/
769 
770 void
772 
773 /*----------------------------------------------------------------------------
774  * Insert boundary wall into a mesh.
775  *----------------------------------------------------------------------------*/
776 
777 void
779 
780 /*----------------------------------------------------------------------------
781  * Mesh smoothing.
782  *
783  * parameters:
784  * mesh <-> pointer to mesh structure to smoothe
785  *----------------------------------------------------------------------------*/
786 
787 void
789 
790 /*----------------------------------------------------------------------------
791  * Enable or disable mesh saving.
792  *
793  * By default, mesh is saved when modified.
794  *
795  * parameters:
796  * mesh <-> pointer to mesh structure
797  *----------------------------------------------------------------------------*/
798 
799 void
801 
802 /*----------------------------------------------------------------------------
803  * Set options for cutting of warped faces
804  *
805  * parameters:
806  * mesh <-> pointer to mesh structure to smoothe
807  *----------------------------------------------------------------------------*/
808 
809 void
811 
812 /*----------------------------------------------------------------------------*/
820 /*----------------------------------------------------------------------------*/
821 
822 void
824  cs_mesh_quantities_t *mesh_quantities);
825 
826 /*----------------------------------------------------------------------------*/
830 /*----------------------------------------------------------------------------*/
831 
832 void
834 
835 /*----------------------------------------------------------------------------
836  * Select physical model options, including user fields.
837  *
838  * This function is called at the earliest stages of the data setup.
839  *----------------------------------------------------------------------------*/
840 
841 void
842 cs_user_model(void);
843 
844 /*----------------------------------------------------------------------------
845  * Define advanced mesh numbering options.
846  *----------------------------------------------------------------------------*/
847 
848 void
849 cs_user_numbering(void);
850 
851 /*----------------------------------------------------------------------------
852  * Define parallel IO settings.
853  *----------------------------------------------------------------------------*/
854 
855 void
856 cs_user_parallel_io(void);
857 
858 /*----------------------------------------------------------------------------
859  * Define advanced partitioning options.
860  *----------------------------------------------------------------------------*/
861 
862 void
863 cs_user_partition(void);
864 
865 /*----------------------------------------------------------------------------
866  * Define sparse matrix tuning options.
867  *----------------------------------------------------------------------------*/
868 
869 void
871 
872 /*----------------------------------------------------------------------------
873  * Define or modify general numerical and physical user parameters.
874  *
875  * At the calling point of this function, most model-related most variables
876  * and other fields have been defined, so specific settings related to those
877  * fields may be set here.
878  *----------------------------------------------------------------------------*/
879 
880 void
882 
883 /*----------------------------------------------------------------------------
884  * User function for input of radiative transfer module options.
885  *----------------------------------------------------------------------------*/
886 
887 void
889 
890 /*-----------------------------------------------------------------------------
891  * User subroutine for input of radiative transfer boundary conditions
892  *----------------------------------------------------------------------------*/
893 
894 void
896  const int bc_type[],
897  int isothp[],
898  cs_real_t *tmin,
899  cs_real_t *tmax,
900  cs_real_t *tx,
901  const cs_real_t dt[],
902  const cs_real_t thwall[],
903  const cs_real_t qincid[],
904  cs_real_t hfcnvp[],
905  cs_real_t flcnvp[],
906  cs_real_t xlamp[],
907  cs_real_t epap[],
908  cs_real_t epsp[],
909  cs_real_t textp[]);
910 
911 /*----------------------------------------------------------------------------
912  * Define periodic faces.
913  *----------------------------------------------------------------------------*/
914 
915 void
916 cs_user_periodicity(void);
917 
918 /*----------------------------------------------------------------------------
919  * Define post-processing writers.
920  *
921  * The default output format and frequency may be configured, and additional
922  * post-processing writers allowing outputs in different formats or with
923  * different format options and output frequency than the main writer may
924  * be defined.
925  *----------------------------------------------------------------------------*/
926 
927 void
929 
930 /*-----------------------------------------------------------------------------
931  * Define monitoring probes and profiles. A profile is seen as a set of probes.
932  *----------------------------------------------------------------------------*/
933 
934 void
936 
937 /*----------------------------------------------------------------------------
938  * Define post-processing meshes.
939  *
940  * The main post-processing meshes may be configured, and additional
941  * post-processing meshes may be defined as a subset of the main mesh's
942  * cells or faces (both interior and boundary).
943  *----------------------------------------------------------------------------*/
944 
945 void
947 
948 /*----------------------------------------------------------------------------
949  * User function for output of values on a post-processing mesh.
950  *----------------------------------------------------------------------------*/
951 
952 void
953 cs_user_postprocess_values(const char *mesh_name,
954  int mesh_id,
955  int cat_id,
956  cs_probe_set_t *probes,
957  cs_lnum_t n_cells,
958  cs_lnum_t n_i_faces,
959  cs_lnum_t n_b_faces,
960  cs_lnum_t n_vertices,
961  const cs_lnum_t cell_list[],
962  const cs_lnum_t i_face_list[],
963  const cs_lnum_t b_face_list[],
964  const cs_lnum_t vertex_list[],
965  const cs_time_step_t *ts);
966 
967 /*----------------------------------------------------------------------------
968  * Override default frequency or calculation end based output.
969  *
970  * This allows fine-grained control of activation or deactivation,
971  *
972  * parameters:
973  * nt_max_abs <-- maximum time step number
974  * nt_cur_abs <-- current time step number
975  * t_cur_abs <-- absolute time at the current time step
976  *----------------------------------------------------------------------------*/
977 
978 void
979 cs_user_postprocess_activate(int nt_max_abs,
980  int nt_cur_abs,
981  double t_cur_abs);
982 
983 /*----------------------------------------------------------------------------
984  * Absorption coefficient for radiative module
985  *----------------------------------------------------------------------------*/
986 
987 void
988 cs_user_rad_transfer_absorption(const int bc_type[],
989  cs_real_t ck[]);
990 
991 /*----------------------------------------------------------------------------
992  * Compute the net radiation flux
993  *----------------------------------------------------------------------------*/
994 
995 void
997  const cs_real_t coefap[],
998  const cs_real_t coefbp[],
999  const cs_real_t cofafp[],
1000  const cs_real_t cofbfp[],
1001  const cs_real_t twall[],
1002  const cs_real_t qincid[],
1003  const cs_real_t xlam[],
1004  const cs_real_t epa[],
1005  const cs_real_t eps[],
1006  const cs_real_t ck[],
1007  cs_real_t net_flux[]);
1008 
1009 /*----------------------------------------------------------------------------
1010  * Set user solver.
1011  *----------------------------------------------------------------------------*/
1012 
1013 int
1014 cs_user_solver_set(void);
1015 
1016 /*----------------------------------------------------------------------------
1017  * Main call to user solver.
1018  *----------------------------------------------------------------------------*/
1019 
1020 void
1022  const cs_mesh_quantities_t *mesh_quantities);
1023 
1024 /*----------------------------------------------------------------------------
1025  * Define couplings with other instances of code_saturne.
1026  *----------------------------------------------------------------------------*/
1027 
1028 void
1030 
1031 /*----------------------------------------------------------------------------
1032  * Define couplings with SYRTHES code.
1033  *----------------------------------------------------------------------------*/
1034 
1035 void
1037 
1038 /*----------------------------------------------------------------------------*/
1048 /*----------------------------------------------------------------------------*/
1049 
1050 void
1051 cs_user_syrthes_coupling_volume_h(int coupling_id,
1052  const char *syrthes_name,
1053  cs_lnum_t n_elts,
1054  const cs_lnum_t elt_ids[],
1055  cs_real_t h_vol[]);
1056 
1057 /*----------------------------------------------------------------------------
1058  * Define couplings with CATHARE code.
1059  *----------------------------------------------------------------------------*/
1060 
1061 void
1063 
1064 /*----------------------------------------------------------------------------
1065  * Define time moments.
1066  *----------------------------------------------------------------------------*/
1067 
1068 void
1069 cs_user_time_moments(void);
1070 
1071 
1072 /*----------------------------------------------------------------------------
1073  * Define time tables.
1074  *----------------------------------------------------------------------------*/
1075 
1076 void
1077 cs_user_time_table(void);
1078 
1079 /*----------------------------------------------------------------------------
1080  * Define rotor/stator model.
1081  *----------------------------------------------------------------------------*/
1082 
1083 void
1085 
1086 /*----------------------------------------------------------------------------
1087  * Define rotor axes, associated cells, and rotor/stator faces.
1088  *----------------------------------------------------------------------------*/
1089 
1090 void
1092 
1093 /*----------------------------------------------------------------------------
1094  * Define rotation velocity of rotor.
1095  *----------------------------------------------------------------------------*/
1096 
1097 void
1099 
1100 /*----------------------------------------------------------------------------*/
1104 /*----------------------------------------------------------------------------*/
1105 
1106 void
1107 cs_user_zones(void);
1108 
1109 /*----------------------------------------------------------------------------*/
1113 /*----------------------------------------------------------------------------*/
1114 
1115 void
1117  const cs_mesh_quantities_t *mesh_quantities,
1118  cs_real_t *dt);
1119 
1120 /*----------------------------------------------------------------------------
1121  * Computation of the relaxation time-scale to equilibrium in the frame of
1122  * the homogeneous two-phase model.
1123  *----------------------------------------------------------------------------*/
1124 
1125 void
1127  const cs_real_t *alpha_eq,
1128  const cs_real_t *y_eq,
1129  const cs_real_t *z_eq,
1130  const cs_real_t *ei,
1131  const cs_real_t *v,
1132  cs_real_t *relax_tau);
1133 
1134 /*----------------------------------------------------------------------------*/
1138 /*----------------------------------------------------------------------------*/
1139 
1140 void
1142 
1143 /*----------------------------------------------------------------------------*/
1147 /*----------------------------------------------------------------------------*/
1148 
1149 void
1151 
1152 /*----------------------------------------------------------------------------*/
1156 /*----------------------------------------------------------------------------*/
1157 
1158 void
1160 
1161 /*----------------------------------------------------------------------------*/
1162 
1164 
1165 #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_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