7.3
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-2022 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_volume_zone.h"
42 
43 /*----------------------------------------------------------------------------*/
44 
46 
47 /*============================================================================
48  * Macro definitions
49  *============================================================================*/
50 
51 /*=============================================================================
52  * Fortran function/subroutine prototypes
53  *============================================================================*/
54 
55 /*----------------------------------------------------------------------------
56  * Main Fortran subroutine
57  *----------------------------------------------------------------------------*/
58 
59 extern void CS_PROCF (caltri, CALTRI)
60 (
61  void
62 );
63 
64 /*----------------------------------------------------------------------------
65  * Poisson equation resolution for hydrostatic pressure.
66  *----------------------------------------------------------------------------*/
67 
68 extern void cs_hydrostatic_pressure_compute(int *indhyd,
69  int iterns,
70  cs_real_t fext[][3],
71  cs_real_t dfext[][3],
72  cs_real_t phydr[],
73  cs_real_t flumas[],
74  cs_real_t flumab[],
75  cs_real_t viscf[],
76  cs_real_t viscb[],
77  cs_real_t dam[],
78  cs_real_t xam[],
79  cs_real_t dpvar[],
80  cs_real_t rhs[]);
81 
82 /*----------------------------------------------------------------------------
83  * Convert gas temperature to and from enthalpy based on concentrations
84  *----------------------------------------------------------------------------*/
85 
86 extern void CS_PROCF (cpthp1, CPTHP1)
87 (
88  const int *mode, /* <-- 1: h to t, 2: t to h */
89  cs_real_t *eh, /* <-> enthalpy of gas mix */
90  cs_real_t *xesp, /* <-- mas fraction of species */
91  cs_real_t *f1mc, /* <-- mean f1 */
92  cs_real_t *f2mc, /* <-- mean f2 */
93  cs_real_t *tp /* <-- gas temperature (K) */
94 );
95 
96 /*----------------------------------------------------------------------------
97  * Initialize Fortran base common block values
98  *----------------------------------------------------------------------------*/
99 
100 extern void CS_PROCF (csinit, CSINIT)
101 (
102  const int *irgpar, /* <-- MPI Rank in parallel, -1 otherwise */
103  const int *nrgpar /* <-- Number of MPI processes, or 1 */
104 );
105 
106 /*----------------------------------------------------------------------------
107  * Find the nearest cell's center from a node
108  *----------------------------------------------------------------------------*/
109 
110 extern void CS_PROCF (findpt, FINDPT)
111 (
112  const cs_lnum_t *ncelet, /* <-- number of extended (real + ghost) cells */
113  const cs_lnum_t *ncel, /* <-- number of cells */
114  const cs_real_t *xyzcen, /* <-- cell centers */
115  const cs_real_t *xx, /* <-- node coordinate X */
116  const cs_real_t *yy, /* <-- node coordinate Y */
117  const cs_real_t *zz, /* <-- node coordinate Z */
118  cs_lnum_t *node, /* --> node we are looking for, zero if error */
119  int *ndrang /* --> rank of associated process */
120 );
121 
122 /*----------------------------------------------------------------------------
123  * Main Fortran options initialization
124  *----------------------------------------------------------------------------*/
125 
126 extern void CS_PROCF (initi1, INITI1)
127 (
128  void
129 );
130 
131 /*----------------------------------------------------------------------------*/
137 /*----------------------------------------------------------------------------*/
138 
139 int *
141 
142 /*----------------------------------------------------------------------------
143  * Add field indexes associated with a new non-user solved variable,
144  * with default options
145  *
146  * parameters:
147  * f_id <-- field id
148  *
149  * returns:
150  * scalar number for defined field
151  *----------------------------------------------------------------------------*/
152 
153 int
155 
156 /*----------------------------------------------------------------------------*/
166 /*----------------------------------------------------------------------------*/
167 
168 void
169 cs_coal_bt2h(cs_lnum_t n_faces,
170  const cs_lnum_t face_ids[],
171  const cs_real_t t[],
172  cs_real_t h[]);
173 
174 /*----------------------------------------------------------------------------*/
184 /*----------------------------------------------------------------------------*/
185 
186 void
187 cs_coal_thfieldconv1(int location_id,
188  const cs_real_t eh[],
189  cs_real_t tp[]);
190 
191 /*----------------------------------------------------------------------------*/
197 /*----------------------------------------------------------------------------*/
198 
199 cs_real_t *
200 cs_get_b_head_loss(void);
201 
202 /*----------------------------------------------------------------------------*/
208 /*----------------------------------------------------------------------------*/
209 
210 cs_real_t *
212 
213 /*----------------------------------------------------------------------------*/
219 /*----------------------------------------------------------------------------*/
220 
221 cs_real_t *
223 
224 /*----------------------------------------------------------------------------*/
234 /*----------------------------------------------------------------------------*/
235 
236 void
237 cs_fuel_bt2h(cs_lnum_t n_faces,
238  const cs_lnum_t face_ids[],
239  const cs_real_t t[],
240  cs_real_t h[]);
241 
242 /*----------------------------------------------------------------------------*/
253 /*----------------------------------------------------------------------------*/
254 
255 cs_real_t
257  cs_real_t tp);
258 
259 /*----------------------------------------------------------------------------*/
270 /*----------------------------------------------------------------------------*/
271 
272 cs_real_t
274  cs_real_t eh);
275 
276 /*----------------------------------------------------------------------------*/
286 /*----------------------------------------------------------------------------*/
287 
288 void
289 cs_fuel_thfieldconv1(int location_id,
290  const cs_real_t eh[],
291  cs_real_t tp[]);
292 
293 /*----------------------------------------------------------------------------
294  * Return Lagrangian model status.
295  *
296  * parameters:
297  * model_flag --> 0 without Lagrangian, 1 or 2 with Lagrangian
298  * restart_flag --> 1 for Lagrangian restart, 0 otherwise
299  * frozen_flag --> 1 for frozen Eulerian flow, 0 otherwise
300  *----------------------------------------------------------------------------*/
301 
302 void
303 cs_lagr_status(int *model_flag,
304  int *restart_flag,
305  int *frozen_flag);
306 
307 /*----------------------------------------------------------------------------
308  * Return condensation model metal structures metal surface.
309  *
310  * return:
311  * metal structures surface
312  *----------------------------------------------------------------------------*/
313 
314 double
315 cs_tagms_s_metal(void);
316 
317 /*============================================================================
318  * User function prototypes
319  *============================================================================*/
320 
321 /*----------------------------------------------------------------------------
322  * Data Entry of the 1D wall thermal module.
323  *----------------------------------------------------------------------------*/
324 
325 void
326 cs_user_1d_wall_thermal(int iappel,
327  int isuit1);
328 
329 /*----------------------------------------------------------------------------
330  * Data Entry of the wall condensation module
331  *----------------------------------------------------------------------------*/
332 
333 void
335  int nscal,
336  int iappel);
337 
338 /*----------------------------------------------------------------------------
339  * Setup boundary conditions to be applied.
340  *----------------------------------------------------------------------------*/
341 
342 void
344 
345 /*----------------------------------------------------------------------------
346  * This function is called at each time step for boundary conditions.
347  *----------------------------------------------------------------------------*/
348 
349 void
351  int bc_type[]);
352 
353 /*----------------------------------------------------------------------------
354  * Boundary conditions for (Arbitrary Lagrangian Eulerian).
355  *----------------------------------------------------------------------------*/
356 
357 void
359  int bc_type[],
360  int ale_bc_type[],
361  int impale[]);
362 
363 /*----------------------------------------------------------------------------*/
375 /*----------------------------------------------------------------------------*/
376 
377 void
379 
380 /*----------------------------------------------------------------------------*/
389 /*----------------------------------------------------------------------------*/
390 
391 void
393 
394 /*----------------------------------------------------------------------------*/
403 /*----------------------------------------------------------------------------*/
404 
405 void
407 
408 /*----------------------------------------------------------------------------*/
421 /*----------------------------------------------------------------------------*/
422 
423 void
425  int structure_id[]);
426 
427 /*----------------------------------------------------------------------------*/
437 /*----------------------------------------------------------------------------*/
438 
439 void
440 cs_user_head_losses(const cs_zone_t *zone,
441  cs_real_t cku[][6]);
442 
443 /*----------------------------------------------------------------------------*/
449 /*----------------------------------------------------------------------------*/
450 
451 void
453 
454 /*----------------------------------------------------------------------------*/
460 /*----------------------------------------------------------------------------*/
461 
462 void
464 
465 /*----------------------------------------------------------------------------*/
474 /*----------------------------------------------------------------------------*/
475 
476 void
478 
479 /*----------------------------------------------------------------------------*/
488 /*----------------------------------------------------------------------------*/
489 
490 void
492 
493 /*----------------------------------------------------------------------------*/
499 /*----------------------------------------------------------------------------*/
500 
501 void
503 
504 /*----------------------------------------------------------------------------*/
522 /*----------------------------------------------------------------------------*/
523 
524 void
526  const cs_zone_t *z,
527  bool z_local,
528  const cs_real_t h[restrict],
529  cs_real_t t[restrict]);
530 
531 /*----------------------------------------------------------------------------*/
549 /*----------------------------------------------------------------------------*/
550 
551 void
553  const cs_zone_t *z,
554  bool z_local,
555  const cs_real_t t[restrict],
556  cs_real_t h[restrict]);
557 
558 /*----------------------------------------------------------------------------*/
577 /*----------------------------------------------------------------------------*/
578 
579 void
581  const cs_real_t mijlij[],
582  const cs_real_t mijmij[]);
583 
584 /*----------------------------------------------------------------------------*/
594 /*----------------------------------------------------------------------------*/
595 
596 void
598  int f_id,
599  cs_real_t *st_exp,
600  cs_real_t *st_imp);
601 
602 /*----------------------------------------------------------------------------*/
612 /*----------------------------------------------------------------------------*/
613 
614 void
616 
617 /*----------------------------------------------------------------------------
618  * Define mesh joinings.
619  *----------------------------------------------------------------------------*/
620 
621 void
622 cs_user_join(void);
623 
624 /*----------------------------------------------------------------------------
625  * Define linear solver options.
626  *
627  * This function is called at the setup stage, once user and most model-based
628  * fields are defined.
629  *----------------------------------------------------------------------------*/
630 
631 void
633 
634 /*----------------------------------------------------------------------------*/
640 /*----------------------------------------------------------------------------*/
641 
642 void
644 
645 /*----------------------------------------------------------------------------
646  * Tag bad cells within the mesh based on geometric criteria.
647  *----------------------------------------------------------------------------*/
648 
649 void
651  cs_mesh_quantities_t *mesh_quantities);
652 
653 /*----------------------------------------------------------------------------
654  * Define mesh files to read and optional associated transformations.
655  *----------------------------------------------------------------------------*/
656 
657 void
658 cs_user_mesh_input(void);
659 
660 /*----------------------------------------------------------------------------
661  * Modifiy geometry and mesh.
662  *----------------------------------------------------------------------------*/
663 
664 void
666 
667 /*----------------------------------------------------------------------------
668  * Insert boundary wall into a mesh.
669  *----------------------------------------------------------------------------*/
670 
671 void
673 
674 /*----------------------------------------------------------------------------
675  * Mesh smoothing.
676  *
677  * parameters:
678  * mesh <-> pointer to mesh structure to smoothe
679  *----------------------------------------------------------------------------*/
680 
681 void
683 
684 /*----------------------------------------------------------------------------
685  * Enable or disable mesh saving.
686  *
687  * By default, mesh is saved when modified.
688  *
689  * parameters:
690  * mesh <-> pointer to mesh structure
691  *----------------------------------------------------------------------------*/
692 
693 void
695 
696 /*----------------------------------------------------------------------------
697  * Set options for cutting of warped faces
698  *
699  * parameters:
700  * mesh <-> pointer to mesh structure to smoothe
701  *----------------------------------------------------------------------------*/
702 
703 void
705 
706 /*----------------------------------------------------------------------------*/
714 /*----------------------------------------------------------------------------*/
715 
716 void
718  cs_mesh_quantities_t *mesh_quantities);
719 
720 /*----------------------------------------------------------------------------*/
724 /*----------------------------------------------------------------------------*/
725 
726 void
728 
729 /*----------------------------------------------------------------------------
730  * Select physical model options, including user fields.
731  *
732  * This function is called at the earliest stages of the data setup.
733  *----------------------------------------------------------------------------*/
734 
735 void
736 cs_user_model(void);
737 
738 /*----------------------------------------------------------------------------
739  * Define advanced mesh numbering options.
740  *----------------------------------------------------------------------------*/
741 
742 void
743 cs_user_numbering(void);
744 
745 /*----------------------------------------------------------------------------
746  * Define parallel IO settings.
747  *----------------------------------------------------------------------------*/
748 
749 void
750 cs_user_parallel_io(void);
751 
752 /*----------------------------------------------------------------------------
753  * Define advanced partitioning options.
754  *----------------------------------------------------------------------------*/
755 
756 void
757 cs_user_partition(void);
758 
759 /*----------------------------------------------------------------------------
760  * Define sparse matrix tuning options.
761  *----------------------------------------------------------------------------*/
762 
763 void
765 
766 /*----------------------------------------------------------------------------
767  * Define or modify general numerical and physical user parameters.
768  *
769  * At the calling point of this function, most model-related most variables
770  * and other fields have been defined, so specific settings related to those
771  * fields may be set here.
772  *----------------------------------------------------------------------------*/
773 
774 void
776 
777 /*----------------------------------------------------------------------------
778  * User function for input of radiative transfer module options.
779  *----------------------------------------------------------------------------*/
780 
781 void
783 
784 /*-----------------------------------------------------------------------------
785  * User subroutine for input of radiative transfer boundary conditions
786  *----------------------------------------------------------------------------*/
787 
788 void
790  const int bc_type[],
791  int isothp[],
792  cs_real_t *tmin,
793  cs_real_t *tmax,
794  cs_real_t *tx,
795  const cs_real_t dt[],
796  const cs_real_t thwall[],
797  const cs_real_t qincid[],
798  cs_real_t hfcnvp[],
799  cs_real_t flcnvp[],
800  cs_real_t xlamp[],
801  cs_real_t epap[],
802  cs_real_t epsp[],
803  cs_real_t textp[]);
804 
805 /*----------------------------------------------------------------------------
806  * Define periodic faces.
807  *----------------------------------------------------------------------------*/
808 
809 void
810 cs_user_periodicity(void);
811 
812 /*----------------------------------------------------------------------------
813  * Define post-processing writers.
814  *
815  * The default output format and frequency may be configured, and additional
816  * post-processing writers allowing outputs in different formats or with
817  * different format options and output frequency than the main writer may
818  * be defined.
819  *----------------------------------------------------------------------------*/
820 
821 void
823 
824 /*-----------------------------------------------------------------------------
825  * Define monitoring probes and profiles. A profile is seen as a set of probes.
826  *----------------------------------------------------------------------------*/
827 
828 void
830 
831 /*----------------------------------------------------------------------------
832  * Define post-processing meshes.
833  *
834  * The main post-processing meshes may be configured, and additional
835  * post-processing meshes may be defined as a subset of the main mesh's
836  * cells or faces (both interior and boundary).
837  *----------------------------------------------------------------------------*/
838 
839 void
841 
842 /*----------------------------------------------------------------------------
843  * User function for output of values on a post-processing mesh.
844  *----------------------------------------------------------------------------*/
845 
846 void
847 cs_user_postprocess_values(const char *mesh_name,
848  int mesh_id,
849  int cat_id,
850  cs_probe_set_t *probes,
851  cs_lnum_t n_cells,
852  cs_lnum_t n_i_faces,
853  cs_lnum_t n_b_faces,
854  cs_lnum_t n_vertices,
855  const cs_lnum_t cell_list[],
856  const cs_lnum_t i_face_list[],
857  const cs_lnum_t b_face_list[],
858  const cs_lnum_t vertex_list[],
859  const cs_time_step_t *ts);
860 
861 /*----------------------------------------------------------------------------
862  * Override default frequency or calculation end based output.
863  *
864  * This allows fine-grained control of activation or deactivation,
865  *
866  * parameters:
867  * nt_max_abs <-- maximum time step number
868  * nt_cur_abs <-- current time step number
869  * t_cur_abs <-- absolute time at the current time step
870  *----------------------------------------------------------------------------*/
871 
872 void
873 cs_user_postprocess_activate(int nt_max_abs,
874  int nt_cur_abs,
875  double t_cur_abs);
876 
877 /*----------------------------------------------------------------------------
878  * Absorption coefficient for radiative module
879  *----------------------------------------------------------------------------*/
880 
881 void
882 cs_user_rad_transfer_absorption(const int bc_type[],
883  cs_real_t ck[]);
884 
885 /*----------------------------------------------------------------------------
886  * Compute the net radiation flux
887  *----------------------------------------------------------------------------*/
888 
889 void
891  const cs_real_t coefap[],
892  const cs_real_t coefbp[],
893  const cs_real_t cofafp[],
894  const cs_real_t cofbfp[],
895  const cs_real_t twall[],
896  const cs_real_t qincid[],
897  const cs_real_t xlam[],
898  const cs_real_t epa[],
899  const cs_real_t eps[],
900  const cs_real_t ck[],
901  cs_real_t net_flux[]);
902 
903 /*----------------------------------------------------------------------------
904  * Set user solver.
905  *----------------------------------------------------------------------------*/
906 
907 int
908 cs_user_solver_set(void);
909 
910 /*----------------------------------------------------------------------------
911  * Main call to user solver.
912  *----------------------------------------------------------------------------*/
913 
914 void
916  const cs_mesh_quantities_t *mesh_quantities);
917 
918 /*----------------------------------------------------------------------------
919  * Define couplings with other instances of code_saturne.
920  *----------------------------------------------------------------------------*/
921 
922 void
924 
925 /*----------------------------------------------------------------------------
926  * Define couplings with SYRTHES code.
927  *----------------------------------------------------------------------------*/
928 
929 void
931 
932 /*----------------------------------------------------------------------------*/
942 /*----------------------------------------------------------------------------*/
943 
944 void
945 cs_user_syrthes_coupling_volume_h(int coupling_id,
946  const char *syrthes_name,
947  cs_lnum_t n_elts,
948  const cs_lnum_t elt_ids[],
949  cs_real_t h_vol[]);
950 
951 /*----------------------------------------------------------------------------
952  * Define time moments.
953  *----------------------------------------------------------------------------*/
954 
955 void
957 
958 /*----------------------------------------------------------------------------
959  * Define rotor/stator model.
960  *----------------------------------------------------------------------------*/
961 
962 void
964 
965 /*----------------------------------------------------------------------------
966  * Define rotor axes, associated cells, and rotor/stator faces.
967  *----------------------------------------------------------------------------*/
968 
969 void
971 
972 /*----------------------------------------------------------------------------
973  * Define rotation velocity of rotor.
974  *----------------------------------------------------------------------------*/
975 
976 void
978 
979 /*----------------------------------------------------------------------------*/
983 /*----------------------------------------------------------------------------*/
984 
985 void
986 cs_user_zones(void);
987 
988 /*----------------------------------------------------------------------------*/
992 /*----------------------------------------------------------------------------*/
993 
994 void
996  const cs_mesh_quantities_t *mesh_quantities,
997  cs_real_t *dt);
998 
999 /*----------------------------------------------------------------------------
1000  * Computation of the relaxation time-scale to equilibrium in the frame of
1001  * the homogeneous two-phase model.
1002  *----------------------------------------------------------------------------*/
1003 
1004 void
1006  const cs_real_t *alpha_eq,
1007  const cs_real_t *y_eq,
1008  const cs_real_t *z_eq,
1009  const cs_real_t *ei,
1010  const cs_real_t *v,
1011  cs_real_t *relax_tau);
1012 
1013 /*============================================================================
1014  * MEG function prototypes
1015  *============================================================================*/
1016 
1017 /*----------------------------------------------------------------------------*/
1030 /*----------------------------------------------------------------------------*/
1031 
1032 cs_real_t *
1034  const char *field_name,
1035  const char *condition);
1036 
1037 /*----------------------------------------------------------------------------*/
1045 /*----------------------------------------------------------------------------*/
1046 
1047 void
1048 cs_meg_volume_function(const cs_zone_t *zone,
1049  cs_field_t *f[]);
1050 
1051 /*----------------------------------------------------------------------------*/
1059 /*----------------------------------------------------------------------------*/
1060 
1061 cs_real_t *
1062 cs_meg_initialization(const cs_zone_t *zone,
1063  const char *field_name);
1064 
1065 /*----------------------------------------------------------------------------*/
1077 /*----------------------------------------------------------------------------*/
1078 
1079 cs_real_t *
1080 cs_meg_source_terms(const cs_zone_t *zone,
1081  const char *name,
1082  const char *source_type);
1083 
1084 /*----------------------------------------------------------------------------*/
1096 /*----------------------------------------------------------------------------*/
1097 
1098 void
1100  const char *object_name,
1101  cs_real_t xyz[3],
1102  cs_real_t t);
1103 
1104 /*----------------------------------------------------------------------------*/
1114 /*----------------------------------------------------------------------------*/
1115 
1116 void
1117 cs_meg_fsi_struct(const char *object_type,
1118  const char *name,
1119  const cs_real_t fluid_f[],
1120  cs_real_t val[]);
1121 
1122 /*----------------------------------------------------------------------------*/
1126 /*----------------------------------------------------------------------------*/
1127 
1128 void
1129 cs_meg_post_activate(void);
1130 
1131 /*----------------------------------------------------------------------------*/
1139 /*----------------------------------------------------------------------------*/
1140 
1141 void
1142 cs_meg_post_profiles(const char *name,
1143  int n_coords,
1144  cs_real_t coords[][3]);
1145 
1146 /*----------------------------------------------------------------------------*/
1150 /*----------------------------------------------------------------------------*/
1151 
1152 void
1154 
1155 /*----------------------------------------------------------------------------*/
1159 /*----------------------------------------------------------------------------*/
1160 
1161 void
1163 
1164 /*----------------------------------------------------------------------------*/
1168 /*----------------------------------------------------------------------------*/
1169 
1170 void
1172 
1173 /*----------------------------------------------------------------------------*/
1174 
1176 
1177 #endif /* __CS_PROTOTYPES_H__ */
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_partition(void)
Define advanced partitioning options.
Definition: cs_user_performance_tuning.c:87
cs_real_t * cs_meg_initialization(const cs_zone_t *zone, const char *field_name)
Evaluate GUI defined mathematical expressions over volume zones for initialization.
Definition: cs_meg_initialization.c:70
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)
void cs_user_internal_coupling_add_volumes(cs_mesh_t *mesh)
Define volumes as internal coupling zones.
Definition: cs_internal_coupling.c:3142
time step descriptor
Definition: cs_time_step.h:64
integer, save ncel
Definition: mesh.f90:50
#define restrict
Definition: cs_defs.h:142
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 initi1(void)
Definition: initi1.f90:29
void cs_user_internal_coupling(void)
Define internal coupling options.
Definition: cs_user_parameters.c:162
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
void cs_user_paramedmem_define_meshes(void)
Define coupled meshes.
Definition: cs_user_paramedmem_coupling.c:95
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.
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.
void cs_user_periodicity(void)
Define periodic faces.
Definition: cs_user_mesh.c:108
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_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_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(void)
Define rotor/stator model.
Definition: cs_user_turbomachinery.c:77
Field descriptor.
Definition: cs_field.h:130
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_user_mesh_cartesian_define(void)
Define a cartesian mesh.
Definition: cs_user_mesh.c:233
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 caltri(void)
Definition: caltri.f90:36
#define BEGIN_C_DECLS
Definition: cs_defs.h:512
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_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_activate(int nt_max_abs, int nt_cur_abs, double t_cur_abs)
Definition: cs_user_postprocess.c:177
void cs_user_postprocess_meshes(void)
Define post-processing meshes.
Definition: cs_user_postprocess.c:86
void cs_user_model(void)
Select physical model options, including user fields.
Definition: cs_user_parameters.c:84
double cs_tagms_s_metal(void)
Definition: cs_tagms.f90:124
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_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_mesh_modify(cs_mesh_t *mesh)
Modify geometry and mesh.
Definition: cs_user_mesh.c:151
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_join(void)
Define mesh joinings.
Definition: cs_user_mesh.c:95
void cs_user_paramedmem_define_fields(void)
Define fields to couple with ParaMEDMEM.
Definition: cs_user_paramedmem_coupling.c:108
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_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_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
void cs_user_radiative_transfer_parameters(void)
User function for input of radiative transfer module options.
Definition: cs_user_radiative_transfer.c:77
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
void cs_user_numbering(void)
Define advanced mesh numbering options.
Definition: cs_user_performance_tuning.c:74
int * cs_atmo_get_auto_flag(void)
Return pointer to automatic face bc flag array.
Definition: atincl.f90:733
integer, save ncelet
Definition: mesh.f90:46
void cs_user_mesh_save(cs_mesh_t *mesh)
Enable or disable mesh saving.
Definition: cs_user_mesh.c:183
Definition: cs_mesh.h:85
void csinit(const int *irgpar, const int *nrgpar)
double precision, dimension(:,:), pointer xyzcen
Definition: mesh.f90:110
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:114
void cs_user_extra_operations_initialize(cs_domain_t *domain)
Initialize variables.
Definition: cs_user_extra_operations.c:86
void cs_user_fsi_external_structure_id(cs_domain_t *domain, int structure_id[])
Define external structure ids for faces associated with external (code_aster) structures.
Definition: cs_user_fluid_structure_interaction.c:82
void cs_user_matrix_tuning(void)
Define sparse matrix tuning options.
Definition: cs_user_performance_tuning.c:113
void cs_user_mesh_warping(void)
Set options for cutting of warped faces.
Definition: cs_user_mesh.c:121
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
void cs_meg_immersed_boundaries_inout(int *ipenal, const char *object_name, cs_real_t xyz[3], cs_real_t t)
void cs_user_postprocess_probes(void)
Define monitoring probes and profiles.
Definition: cs_user_postprocess.c:101
void cs_lagr_status(int *model_flag, int *restart_flag, int *frozen_flag)
int cs_user_solver_set(void)
Set user solver.
Definition: cs_user_solver.c:75
Definition: cs_field_pointer.h:91
Definition: cs_field_pointer.h:65
cs_real_t * cs_get_cavitation_gam(void)
Return pointer to cavitation "gamcav" array.
Definition: pointe.f90:650
void cs_meg_fsi_struct(const char *object_type, const char *name, const cs_real_t fluid_f[], cs_real_t val[])
This function is used to query FSI internal coupling structure values for a given boundary and struct...
Definition: cs_meg_fsi_struct.c:70
void cs_user_linear_solvers(void)
Define linear solver options.
Definition: cs_user_parameters.c:130
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.
Definition: cs_mesh_quantities.h:89
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
integer, dimension(:), pointer, save itypfb
Definition: pointe.f90:100
integer, save isuit1
Definition: optcal.f90:245
Structure storing the main features of the computational domain and pointers to the main geometrical ...
Definition: cs_domain.h:140
integer, save nvar
number of solved variables (must be lower than nvarmx)
Definition: dimens.f90:42
cs_real_t * cs_get_b_head_loss(void)
Return pointer to boundary head losses array.
Definition: pointe.f90:622
cs_real_t * cs_meg_boundary_function(const cs_zone_t *zone, const char *field_name, const char *condition)
Definition: cs_meg_boundary_function.c:71
void cs_meg_post_profiles(const char *name, int n_coords, cs_real_t coords[][3])
This function is used to define profile coordinates.
Definition: cs_meg_post_profile.c:68
void cs_user_time_moments(void)
Define time moments.
Definition: cs_user_parameters.c:147
Definition: cs_field_pointer.h:183
integer, dimension(:), allocatable impale
indicator of imposed displacement
Definition: albase.f90:56
void cs_user_mesh_input(void)
Define mesh files to read and optional associated transformations.
Definition: cs_user_mesh.c:82
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_boundary_conditions(cs_domain_t *domain, int bc_type[])
User definition of boundary conditions.
Definition: cs_user_boundary_conditions.c:125
void cs_user_postprocess_writers(void)
Define post-processing writers.
Definition: cs_user_postprocess.c:69
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
cs_real_t * cs_meg_source_terms(const cs_zone_t *zone, const char *name, const char *source_type)
Definition: cs_meg_source_terms.c:71
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_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_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.
int cs_add_model_field_indexes(int f_id)
#define END_C_DECLS
Definition: cs_defs.h:513
void cs_meg_volume_function(const cs_zone_t *zone, cs_field_t *f[])
This function is used to compute user defined values for fields over a given volume zone...
Definition: cs_meg_volume_function.c:68
integer, save nscal
number of solved user scalars effective number of scalars solutions of an advection equation...
Definition: dimens.f90:55
void cs_meg_post_activate(void)
This function is used to activate postprocessing writers.
Definition: cs_meg_post_output.c:64
void cs_user_turbomachinery_set_rotation_velocity(void)
Define rotation velocity of rotor.
Definition: cs_user_turbomachinery.c:103
struct _cs_probe_set_t cs_probe_set_t
Definition: cs_probe.h:53
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
#define CS_PROCF(x, y)
Definition: cs_defs.h:526
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_boundary(cs_mesh_t *mesh)
Insert boundaries into a mesh.
Definition: cs_user_mesh.c:136
void cs_user_syrthes_coupling(void)
Define couplings with SYRTHES code.
Definition: cs_user_coupling.c:95
Definition: cs_field_pointer.h:92
void cs_user_turbomachinery_rotor(void)
Define rotor axes, associated cells, and rotor/stator faces.
Definition: cs_user_turbomachinery.c:90
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)
cs_real_t * cs_get_cavitation_dgdp_st(void)
Return pointer to cavitation "dgdpca" array.
Definition: pointe.f90:636
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_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_parallel_io(void)
Define parallel IO settings.
Definition: cs_user_performance_tuning.c:100
Definition: cs_field_pointer.h:71
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_saturne_coupling(void)
Define couplings with other instances of code_saturne.
Definition: cs_user_coupling.c:79
void cs_user_mesh_smoothe(cs_mesh_t *mesh)
Mesh smoothing.
Definition: cs_user_mesh.c:166
void cs_user_1d_wall_thermal(int iappel, int isuit1)
Definition: cs_user_1d_wall_thermal.c:82
Definition: mesh.f90:26
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_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_initialization(cs_domain_t *domain)
This function is called one time step to initialize problem.
Definition: cs_user_initialization.c:88
Definition: cs_field_pointer.h:184
Definition: cs_zone.h:55
void cs_user_zones(void)
Define volume and surface zones.
Definition: cs_user_zones.c:65