7.2
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  * Developer function for output of variables on a post-processing mesh
108  *----------------------------------------------------------------------------*/
109 
110 extern void CS_PROCF (dvvpst, DVVPST)
111 (
112  const int *nummai, /* <-- number or post-processing mesh */
113  const int *numtyp, /* <-- number or post-processing type
114  * (-1 as volume, -2 as boundary, or nummai) */
115  const int *nvar, /* <-- number of variables */
116  const cs_lnum_t *ncelps, /* <-- number of post-processed cells */
117  const cs_lnum_t *nfbrps, /* <-- number of post processed boundary faces */
118  const cs_lnum_t lstcel[], /* <-- list of post-processed cells */
119  const cs_lnum_t lstfbr[], /* <-- list of post-processed boundary faces */
120  cs_real_t tracel[], /* --- work array for output cells */
121  cs_real_t trafbr[] /* --- work array for output boundary faces */
122 );
123 
124 /*----------------------------------------------------------------------------
125  * Find the nearest cell's center from a node
126  *----------------------------------------------------------------------------*/
127 
128 extern void CS_PROCF (findpt, FINDPT)
129 (
130  const cs_lnum_t *ncelet, /* <-- number of extended (real + ghost) cells */
131  const cs_lnum_t *ncel, /* <-- number of cells */
132  const cs_real_t *xyzcen, /* <-- cell centers */
133  const cs_real_t *xx, /* <-- node coordinate X */
134  const cs_real_t *yy, /* <-- node coordinate Y */
135  const cs_real_t *zz, /* <-- node coordinate Z */
136  cs_lnum_t *node, /* --> node we are looking for, zero if error */
137  int *ndrang /* --> rank of associated process */
138 );
139 
140 /*----------------------------------------------------------------------------
141  * Check necessity of extended mesh from FORTRAN options.
142  *
143  * Interface Fortran :
144  *
145  * SUBROUTINE HALTYP (IVOSET)
146  * *****************
147  *
148  * INTEGER IVOSET : <-- : Indicator of necessity of extended mesh
149  *----------------------------------------------------------------------------*/
150 
151 extern void
152 CS_PROCF (haltyp, HALTYP)(const int *ivoset);
153 
154 /*----------------------------------------------------------------------------
155  * Main Fortran options initialization
156  *----------------------------------------------------------------------------*/
157 
158 extern void CS_PROCF (initi1, INITI1)
159 (
160  void
161 );
162 
163 /*----------------------------------------------------------------------------*/
169 /*----------------------------------------------------------------------------*/
170 
171 int *
173 
174 /*----------------------------------------------------------------------------
175  * Add field indexes associated with a new non-user solved variable,
176  * with default options
177  *
178  * parameters:
179  * f_id <-- field id
180  *
181  * returns:
182  * scalar number for defined field
183  *----------------------------------------------------------------------------*/
184 
185 int
187 
188 /*----------------------------------------------------------------------------*/
198 /*----------------------------------------------------------------------------*/
199 
200 void
201 cs_coal_bt2h(cs_lnum_t n_faces,
202  const cs_lnum_t face_ids[],
203  const cs_real_t t[],
204  cs_real_t h[]);
205 
206 /*----------------------------------------------------------------------------*/
216 /*----------------------------------------------------------------------------*/
217 
218 void
219 cs_coal_thfieldconv1(int location_id,
220  const cs_real_t eh[],
221  cs_real_t tp[]);
222 
223 /*----------------------------------------------------------------------------*/
229 /*----------------------------------------------------------------------------*/
230 
231 cs_real_t *
232 cs_get_b_head_loss(void);
233 
234 /*----------------------------------------------------------------------------*/
240 /*----------------------------------------------------------------------------*/
241 
242 cs_real_t *
244 
245 /*----------------------------------------------------------------------------*/
251 /*----------------------------------------------------------------------------*/
252 
253 cs_real_t *
255 
256 /*----------------------------------------------------------------------------*/
266 /*----------------------------------------------------------------------------*/
267 
268 void
269 cs_fuel_bt2h(cs_lnum_t n_faces,
270  const cs_lnum_t face_ids[],
271  const cs_real_t t[],
272  cs_real_t h[]);
273 
274 /*----------------------------------------------------------------------------*/
284 /*----------------------------------------------------------------------------*/
285 
286 void
287 cs_fuel_thfieldconv1(int location_id,
288  const cs_real_t eh[],
289  cs_real_t tp[]);
290 
291 /*----------------------------------------------------------------------------
292  * Return Lagrangian model status.
293  *
294  * parameters:
295  * model_flag --> 0 without Lagrangian, 1 or 2 with Lagrangian
296  * restart_flag --> 1 for Lagrangian restart, 0 otherwise
297  * frozen_flag --> 1 for frozen Eulerian flow, 0 otherwise
298  *----------------------------------------------------------------------------*/
299 
300 void
301 cs_lagr_status(int *model_flag,
302  int *restart_flag,
303  int *frozen_flag);
304 
305 /*----------------------------------------------------------------------------
306  * Return condensation model metal structures metal surface.
307  *
308  * return:
309  * metal structures surface
310  *----------------------------------------------------------------------------*/
311 
312 double
313 cs_tagms_s_metal(void);
314 
315 /*============================================================================
316  * User function prototypes
317  *============================================================================*/
318 
319 /*----------------------------------------------------------------------------
320  * Data Entry of the 1D wall thermal module.
321  *----------------------------------------------------------------------------*/
322 
323 void
324 cs_user_1d_wall_thermal(int iappel,
325  int isuit1);
326 
327 /*----------------------------------------------------------------------------
328  * Data Entry of the wall condensation module
329  *----------------------------------------------------------------------------*/
330 
331 void
333  int nscal,
334  int iappel);
335 
336 /*----------------------------------------------------------------------------
337  * Setup boundary conditions to be applied.
338  *----------------------------------------------------------------------------*/
339 
340 void
342 
343 /*----------------------------------------------------------------------------
344  * This function is called at each time step for boundary conditions.
345  *----------------------------------------------------------------------------*/
346 
347 void
349  int icodcl[],
350  int bc_type[],
351  cs_real_t rcodcl[]);
352 
353 /*----------------------------------------------------------------------------*/
365 /*----------------------------------------------------------------------------*/
366 
367 void
369 
370 /*----------------------------------------------------------------------------*/
379 /*----------------------------------------------------------------------------*/
380 
381 void
383 
384 /*----------------------------------------------------------------------------*/
393 /*----------------------------------------------------------------------------*/
394 
395 void
397 
398 /*----------------------------------------------------------------------------*/
408 /*----------------------------------------------------------------------------*/
409 
410 void
411 cs_user_head_losses(const cs_zone_t *zone,
412  cs_real_t cku[][6]);
413 
414 /*----------------------------------------------------------------------------*/
420 /*----------------------------------------------------------------------------*/
421 
422 void
424 
425 /*----------------------------------------------------------------------------*/
431 /*----------------------------------------------------------------------------*/
432 
433 void
435 
436 /*----------------------------------------------------------------------------*/
445 /*----------------------------------------------------------------------------*/
446 
447 void
449 
450 /*----------------------------------------------------------------------------*/
459 /*----------------------------------------------------------------------------*/
460 
461 void
463 
464 /*----------------------------------------------------------------------------*/
470 /*----------------------------------------------------------------------------*/
471 
472 void
474 
475 /*----------------------------------------------------------------------------*/
493 /*----------------------------------------------------------------------------*/
494 
495 void
497  const cs_zone_t *z,
498  bool z_local,
499  const cs_real_t h[restrict],
500  cs_real_t t[restrict]);
501 
502 /*----------------------------------------------------------------------------*/
520 /*----------------------------------------------------------------------------*/
521 
522 void
524  const cs_zone_t *z,
525  bool z_local,
526  const cs_real_t t[restrict],
527  cs_real_t h[restrict]);
528 
529 /*----------------------------------------------------------------------------*/
548 /*----------------------------------------------------------------------------*/
549 
550 void
552  const cs_real_t mijlij[],
553  const cs_real_t mijmij[]);
554 
555 /*----------------------------------------------------------------------------*/
565 /*----------------------------------------------------------------------------*/
566 
567 void
569  int f_id,
570  cs_real_t *st_exp,
571  cs_real_t *st_imp);
572 
573 /*----------------------------------------------------------------------------*/
583 /*----------------------------------------------------------------------------*/
584 
585 void
587 
588 /*----------------------------------------------------------------------------
589  * Define mesh joinings.
590  *----------------------------------------------------------------------------*/
591 
592 void
593 cs_user_join(void);
594 
595 /*----------------------------------------------------------------------------
596  * Define linear solver options.
597  *
598  * This function is called at the setup stage, once user and most model-based
599  * fields are defined.
600  *----------------------------------------------------------------------------*/
601 
602 void
604 
605 /*----------------------------------------------------------------------------*/
611 /*----------------------------------------------------------------------------*/
612 
613 void
615 
616 /*----------------------------------------------------------------------------
617  * Tag bad cells within the mesh based on geometric criteria.
618  *----------------------------------------------------------------------------*/
619 
620 void
622  cs_mesh_quantities_t *mesh_quantities);
623 
624 /*----------------------------------------------------------------------------
625  * Define mesh files to read and optional associated transformations.
626  *----------------------------------------------------------------------------*/
627 
628 void
629 cs_user_mesh_input(void);
630 
631 /*----------------------------------------------------------------------------
632  * Modifiy geometry and mesh.
633  *----------------------------------------------------------------------------*/
634 
635 void
637 
638 /*----------------------------------------------------------------------------
639  * Insert boundary wall into a mesh.
640  *----------------------------------------------------------------------------*/
641 
642 void
644 
645 /*----------------------------------------------------------------------------
646  * Mesh smoothing.
647  *
648  * parameters:
649  * mesh <-> pointer to mesh structure to smoothe
650  *----------------------------------------------------------------------------*/
651 
652 void
654 
655 /*----------------------------------------------------------------------------
656  * Enable or disable mesh saving.
657  *
658  * By default, mesh is saved when modified.
659  *
660  * parameters:
661  * mesh <-> pointer to mesh structure
662  *----------------------------------------------------------------------------*/
663 
664 void
666 
667 /*----------------------------------------------------------------------------
668  * Set options for cutting of warped faces
669  *
670  * parameters:
671  * mesh <-> pointer to mesh structure to smoothe
672  *----------------------------------------------------------------------------*/
673 
674 void
676 
677 /*----------------------------------------------------------------------------*/
685 /*----------------------------------------------------------------------------*/
686 
687 void
689  cs_mesh_quantities_t *mesh_quantities);
690 
691 /*----------------------------------------------------------------------------*/
695 /*----------------------------------------------------------------------------*/
696 
697 void
699 
700 /*----------------------------------------------------------------------------
701  * Select physical model options, including user fields.
702  *
703  * This function is called at the earliest stages of the data setup.
704  *----------------------------------------------------------------------------*/
705 
706 void
707 cs_user_model(void);
708 
709 /*----------------------------------------------------------------------------
710  * Define advanced mesh numbering options.
711  *----------------------------------------------------------------------------*/
712 
713 void
714 cs_user_numbering(void);
715 
716 /*----------------------------------------------------------------------------
717  * Define parallel IO settings.
718  *----------------------------------------------------------------------------*/
719 
720 void
721 cs_user_parallel_io(void);
722 
723 /*----------------------------------------------------------------------------
724  * Define advanced partitioning options.
725  *----------------------------------------------------------------------------*/
726 
727 void
728 cs_user_partition(void);
729 
730 /*----------------------------------------------------------------------------
731  * Define sparse matrix tuning options.
732  *----------------------------------------------------------------------------*/
733 
734 void
736 
737 /*----------------------------------------------------------------------------
738  * Define or modify general numerical and physical user parameters.
739  *
740  * At the calling point of this function, most model-related most variables
741  * and other fields have been defined, so specific settings related to those
742  * fields may be set here.
743  *----------------------------------------------------------------------------*/
744 
745 void
747 
748 /*----------------------------------------------------------------------------
749  * User function for input of radiative transfer module options.
750  *----------------------------------------------------------------------------*/
751 
752 void
754 
755 /*-----------------------------------------------------------------------------
756  * User subroutine for input of radiative transfer boundary conditions
757  *----------------------------------------------------------------------------*/
758 
759 void
761  const int bc_type[],
762  int icodcl[],
763  int isothp[],
764  cs_real_t *tmin,
765  cs_real_t *tmax,
766  cs_real_t *tx,
767  const cs_real_t dt[],
768  cs_real_t rcodcl[],
769  const cs_real_t thwall[],
770  const cs_real_t qincid[],
771  cs_real_t hfcnvp[],
772  cs_real_t flcnvp[],
773  cs_real_t xlamp[],
774  cs_real_t epap[],
775  cs_real_t epsp[],
776  cs_real_t textp[]);
777 
778 /*----------------------------------------------------------------------------
779  * Define periodic faces.
780  *----------------------------------------------------------------------------*/
781 
782 void
783 cs_user_periodicity(void);
784 
785 /*----------------------------------------------------------------------------
786  * Define post-processing writers.
787  *
788  * The default output format and frequency may be configured, and additional
789  * post-processing writers allowing outputs in different formats or with
790  * different format options and output frequency than the main writer may
791  * be defined.
792  *----------------------------------------------------------------------------*/
793 
794 void
796 
797 /*-----------------------------------------------------------------------------
798  * Define monitoring probes and profiles. A profile is seen as a set of probes.
799  *----------------------------------------------------------------------------*/
800 
801 void
803 
804 /*----------------------------------------------------------------------------
805  * Define post-processing meshes.
806  *
807  * The main post-processing meshes may be configured, and additional
808  * post-processing meshes may be defined as a subset of the main mesh's
809  * cells or faces (both interior and boundary).
810  *----------------------------------------------------------------------------*/
811 
812 void
814 
815 /*----------------------------------------------------------------------------
816  * User function for output of values on a post-processing mesh.
817  *----------------------------------------------------------------------------*/
818 
819 void
820 cs_user_postprocess_values(const char *mesh_name,
821  int mesh_id,
822  int cat_id,
823  cs_probe_set_t *probes,
824  cs_lnum_t n_cells,
825  cs_lnum_t n_i_faces,
826  cs_lnum_t n_b_faces,
827  cs_lnum_t n_vertices,
828  const cs_lnum_t cell_list[],
829  const cs_lnum_t i_face_list[],
830  const cs_lnum_t b_face_list[],
831  const cs_lnum_t vertex_list[],
832  const cs_time_step_t *ts);
833 
834 /*----------------------------------------------------------------------------
835  * Override default frequency or calculation end based output.
836  *
837  * This allows fine-grained control of activation or deactivation,
838  *
839  * parameters:
840  * nt_max_abs <-- maximum time step number
841  * nt_cur_abs <-- current time step number
842  * t_cur_abs <-- absolute time at the current time step
843  *----------------------------------------------------------------------------*/
844 
845 void
846 cs_user_postprocess_activate(int nt_max_abs,
847  int nt_cur_abs,
848  double t_cur_abs);
849 
850 /*----------------------------------------------------------------------------
851  * Absorption coefficient for radiative module
852  *----------------------------------------------------------------------------*/
853 
854 void
855 cs_user_rad_transfer_absorption(const int bc_type[],
856  cs_real_t ck[]);
857 
858 /*----------------------------------------------------------------------------
859  * Compute the net radiation flux
860  *----------------------------------------------------------------------------*/
861 
862 void
864  const cs_real_t coefap[],
865  const cs_real_t coefbp[],
866  const cs_real_t cofafp[],
867  const cs_real_t cofbfp[],
868  const cs_real_t twall[],
869  const cs_real_t qincid[],
870  const cs_real_t xlam[],
871  const cs_real_t epa[],
872  const cs_real_t eps[],
873  const cs_real_t ck[],
874  cs_real_t net_flux[]);
875 
876 /*----------------------------------------------------------------------------
877  * Set user solver.
878  *----------------------------------------------------------------------------*/
879 
880 int
881 cs_user_solver_set(void);
882 
883 /*----------------------------------------------------------------------------
884  * Main call to user solver.
885  *----------------------------------------------------------------------------*/
886 
887 void
889  const cs_mesh_quantities_t *mesh_quantities);
890 
891 /*----------------------------------------------------------------------------
892  * Define couplings with other instances of code_saturne.
893  *----------------------------------------------------------------------------*/
894 
895 void
897 
898 /*----------------------------------------------------------------------------
899  * Define couplings with SYRTHES code.
900  *----------------------------------------------------------------------------*/
901 
902 void
904 
905 /*----------------------------------------------------------------------------*/
915 /*----------------------------------------------------------------------------*/
916 
917 void
918 cs_user_syrthes_coupling_volume_h(int coupling_id,
919  const char *syrthes_name,
920  cs_lnum_t n_elts,
921  const cs_lnum_t elt_ids[],
922  cs_real_t h_vol[]);
923 
924 /*----------------------------------------------------------------------------
925  * Define time moments.
926  *----------------------------------------------------------------------------*/
927 
928 void
930 
931 /*----------------------------------------------------------------------------
932  * Define rotor/stator model.
933  *----------------------------------------------------------------------------*/
934 
935 void
937 
938 /*----------------------------------------------------------------------------
939  * Define rotor axes, associated cells, and rotor/stator faces.
940  *----------------------------------------------------------------------------*/
941 
942 void
944 
945 /*----------------------------------------------------------------------------
946  * Define rotation velocity of rotor.
947  *----------------------------------------------------------------------------*/
948 
949 void
951 
952 /*----------------------------------------------------------------------------*/
956 /*----------------------------------------------------------------------------*/
957 
958 void
959 cs_user_zones(void);
960 
961 /*----------------------------------------------------------------------------*/
965 /*----------------------------------------------------------------------------*/
966 
967 void
969  const cs_mesh_quantities_t *mesh_quantities,
970  cs_real_t *dt);
971 
972 /*----------------------------------------------------------------------------
973  * Computation of the relaxation time-scale to equilibrium in the frame of
974  * the homogeneous two-phase model.
975  *----------------------------------------------------------------------------*/
976 
977 void
979  const cs_real_t *alpha_eq,
980  const cs_real_t *y_eq,
981  const cs_real_t *z_eq,
982  const cs_real_t *ei,
983  const cs_real_t *v,
984  cs_real_t *relax_tau);
985 
986 /*============================================================================
987  * MEG function prototypes
988  *============================================================================*/
989 
990 /*----------------------------------------------------------------------------*/
1003 /*----------------------------------------------------------------------------*/
1004 
1005 cs_real_t *
1007  const char *field_name,
1008  const char *condition);
1009 
1010 /*----------------------------------------------------------------------------*/
1018 /*----------------------------------------------------------------------------*/
1019 
1020 void
1021 cs_meg_volume_function(const cs_zone_t *zone,
1022  cs_field_t *f[]);
1023 
1024 /*----------------------------------------------------------------------------*/
1032 /*----------------------------------------------------------------------------*/
1033 
1034 cs_real_t *
1035 cs_meg_initialization(const cs_zone_t *zone,
1036  const char *field_name);
1037 
1038 /*----------------------------------------------------------------------------*/
1050 /*----------------------------------------------------------------------------*/
1051 
1052 cs_real_t *
1053 cs_meg_source_terms(const cs_zone_t *zone,
1054  const char *name,
1055  const char *source_type);
1056 
1057 /*----------------------------------------------------------------------------*/
1069 /*----------------------------------------------------------------------------*/
1070 
1071 void
1073  const char *object_name,
1074  cs_real_t xyz[3],
1075  cs_real_t t);
1076 
1077 /*----------------------------------------------------------------------------*/
1087 /*----------------------------------------------------------------------------*/
1088 
1089 void
1090 cs_meg_fsi_struct(const char *object_type,
1091  const char *name,
1092  const cs_real_t fluid_f[],
1093  cs_real_t val[]);
1094 
1095 /*----------------------------------------------------------------------------*/
1099 /*----------------------------------------------------------------------------*/
1100 
1101 void
1102 cs_meg_post_activate(void);
1103 
1104 /*----------------------------------------------------------------------------*/
1112 /*----------------------------------------------------------------------------*/
1113 
1114 void
1115 cs_meg_post_profiles(const char *name,
1116  int n_coords,
1117  cs_real_t coords[][3]);
1118 
1119 /*----------------------------------------------------------------------------*/
1123 /*----------------------------------------------------------------------------*/
1124 
1125 void
1127 
1128 /*----------------------------------------------------------------------------*/
1132 /*----------------------------------------------------------------------------*/
1133 
1134 void
1136 
1137 /*----------------------------------------------------------------------------*/
1141 /*----------------------------------------------------------------------------*/
1142 
1143 void
1145 
1146 /*----------------------------------------------------------------------------*/
1147 
1149 
1150 #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:3147
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:126
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:81
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.
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)
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:108
void cs_user_boundary_conditions_setup(cs_domain_t *domain)
Set boundary conditions to be applied.
Definition: cs_user_boundary_conditions.c:83
void cs_user_turbomachinery(void)
Define rotor/stator model.
Definition: cs_user_turbomachinery.c:77
Field descriptor.
Definition: cs_field.h:125
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:510
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 haltyp(const int *ivoset)
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 dvvpst(const int *nummai, const int *numtyp, const int *nvar, const cs_lnum_t *ncelps, const cs_lnum_t *nfbrps, const cs_lnum_t lstcel[], const cs_lnum_t lstfbr[], cs_real_t tracel[], cs_real_t trafbr[])
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:660
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:84
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:90
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
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:3166
integer, dimension(:), pointer, save itypfb
Definition: pointe.f90:100
integer, save isuit1
Definition: optcal.f90:297
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
void cs_user_radiative_transfer_bcs(int nvar, const int bc_type[], int icodcl[], int isothp[], cs_real_t *tmin, cs_real_t *tmax, cs_real_t *tx, const cs_real_t dt[], cs_real_t rcodcl[], 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:130
Definition: cs_field_pointer.h:183
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_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_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:511
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:524
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:173
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_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:92
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:88
void cs_user_boundary_conditions(int nvar, int icodcl[], int bc_type[], cs_real_t rcodcl[])
User definition of boundary conditions.
Definition: cs_user_boundary_conditions.c:132
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