7.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-2021 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  * Convert gas temperature to and from enthalpy based on concentrations
66  *----------------------------------------------------------------------------*/
67 
68 extern void CS_PROCF (cpthp1, CPTHP1)
69 (
70  const int *mode, /* <-- 1: h to t, 2: t to h */
71  cs_real_t *eh, /* <-> enthalpy of gas mix */
72  cs_real_t *xesp, /* <-- mas fraction of species */
73  cs_real_t *f1mc, /* <-- mean f1 */
74  cs_real_t *f2mc, /* <-- mean f2 */
75  cs_real_t *tp /* <-- gas temperature (K) */
76 );
77 
78 /*----------------------------------------------------------------------------
79  * Initialize Fortran base common block values
80  *----------------------------------------------------------------------------*/
81 
82 extern void CS_PROCF (csinit, CSINIT)
83 (
84  const int *irgpar, /* <-- MPI Rank in parallel, -1 otherwise */
85  const int *nrgpar /* <-- Number of MPI processes, or 1 */
86 );
87 
88 /*----------------------------------------------------------------------------
89  * Developer function for output of variables on a post-processing mesh
90  *----------------------------------------------------------------------------*/
91 
92 extern void CS_PROCF (dvvpst, DVVPST)
93 (
94  const int *nummai, /* <-- number or post-processing mesh */
95  const int *numtyp, /* <-- number or post-processing type
96  * (-1 as volume, -2 as boundary, or nummai) */
97  const int *nvar, /* <-- number of variables */
98  const cs_lnum_t *ncelps, /* <-- number of post-processed cells */
99  const cs_lnum_t *nfbrps, /* <-- number of post processed boundary faces */
100  const cs_lnum_t lstcel[], /* <-- list of post-processed cells */
101  const cs_lnum_t lstfbr[], /* <-- list of post-processed boundary faces */
102  cs_real_t tracel[], /* --- work array for output cells */
103  cs_real_t trafbr[] /* --- work array for output boundary faces */
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  * Check necessity of extended mesh from FORTRAN options.
124  *
125  * Interface Fortran :
126  *
127  * SUBROUTINE HALTYP (IVOSET)
128  * *****************
129  *
130  * INTEGER IVOSET : <-- : Indicator of necessity of extended mesh
131  *----------------------------------------------------------------------------*/
132 
133 extern void
134 CS_PROCF (haltyp, HALTYP)(const int *ivoset);
135 
136 /*----------------------------------------------------------------------------
137  * Main Fortran options initialization
138  *----------------------------------------------------------------------------*/
139 
140 extern void CS_PROCF (initi1, INITI1)
141 (
142  void
143 );
144 
145 /*----------------------------------------------------------------------------
146  * Add field indexes associated with a new non-user solved variable,
147  * with default options
148  *
149  * parameters:
150  * f_id <-- field id
151  *
152  * returns:
153  * scalar number for defined field
154  *----------------------------------------------------------------------------*/
155 
156 int
158 
159 /*----------------------------------------------------------------------------*/
169 /*----------------------------------------------------------------------------*/
170 
171 void
173  const cs_lnum_t face_ids[],
174  const cs_real_t t[],
175  cs_real_t h[]);
176 
177 /*----------------------------------------------------------------------------*/
187 /*----------------------------------------------------------------------------*/
188 
189 void
190 cs_coal_thfieldconv1(int location_id,
191  const cs_real_t eh[],
192  cs_real_t tp[]);
193 
194 /*----------------------------------------------------------------------------*/
204 /*----------------------------------------------------------------------------*/
205 
206 void
208  const cs_lnum_t face_ids[],
209  const cs_real_t t[],
210  cs_real_t h[]);
211 
212 /*----------------------------------------------------------------------------*/
222 /*----------------------------------------------------------------------------*/
223 
224 void
225 cs_fuel_thfieldconv1(int location_id,
226  const cs_real_t eh[],
227  cs_real_t tp[]);
228 
229 /*----------------------------------------------------------------------------
230  * Return Lagrangian model status.
231  *
232  * parameters:
233  * model_flag --> 0 without Lagrangian, 1 or 2 with Lagrangian
234  * restart_flag --> 1 for Lagrangian restart, 0 otherwise
235  * frozen_flag --> 1 for frozen Eulerian flow, 0 otherwise
236  *----------------------------------------------------------------------------*/
237 
238 void
239 cs_lagr_status(int *model_flag,
240  int *restart_flag,
241  int *frozen_flag);
242 
243 /*============================================================================
244  * User function prototypes
245  *============================================================================*/
246 
247 /*----------------------------------------------------------------------------
248  * Data Entry of the 1D wall thermal module.
249  *----------------------------------------------------------------------------*/
250 
251 void
252 cs_user_1d_wall_thermal(int iappel,
253  int isuit1);
254 
255 /*----------------------------------------------------------------------------
256  * This function is called at each time step for boundary conditions.
257  *----------------------------------------------------------------------------*/
258 
259 void
261  int icodcl[],
262  int bc_type[],
263  cs_real_t rcodcl[]);
264 
265 /*----------------------------------------------------------------------------*/
277 /*----------------------------------------------------------------------------*/
278 
279 void
281 
282 /*----------------------------------------------------------------------------*/
291 /*----------------------------------------------------------------------------*/
292 
293 void
295 
296 /*----------------------------------------------------------------------------*/
305 /*----------------------------------------------------------------------------*/
306 
307 void
309 
310 /*----------------------------------------------------------------------------*/
320 /*----------------------------------------------------------------------------*/
321 
322 void
323 cs_user_head_losses(const cs_zone_t *zone,
324  cs_real_t cku[][6]);
325 
326 /*----------------------------------------------------------------------------*/
332 /*----------------------------------------------------------------------------*/
333 
334 void
336 
337 /*----------------------------------------------------------------------------*/
343 /*----------------------------------------------------------------------------*/
344 
345 void
347 
348 /*----------------------------------------------------------------------------*/
357 /*----------------------------------------------------------------------------*/
358 
359 void
361 
362 /*----------------------------------------------------------------------------*/
371 /*----------------------------------------------------------------------------*/
372 
373 void
375 
376 /*----------------------------------------------------------------------------*/
382 /*----------------------------------------------------------------------------*/
383 
384 void
386 
387 /*----------------------------------------------------------------------------*/
405 /*----------------------------------------------------------------------------*/
406 
407 void
409  const cs_zone_t *z,
410  bool z_local,
411  const cs_real_t h[restrict],
412  cs_real_t t[restrict]);
413 
414 /*----------------------------------------------------------------------------*/
432 /*----------------------------------------------------------------------------*/
433 
434 void
436  const cs_zone_t *z,
437  bool z_local,
438  const cs_real_t t[restrict],
439  cs_real_t h[restrict]);
440 
441 /*----------------------------------------------------------------------------*/
451 /*----------------------------------------------------------------------------*/
452 
453 void
455  int f_id,
456  cs_real_t *st_exp,
457  cs_real_t *st_imp);
458 
459 /*----------------------------------------------------------------------------*/
469 /*----------------------------------------------------------------------------*/
470 
471 void
473 
474 /*----------------------------------------------------------------------------
475  * Define mesh joinings.
476  *----------------------------------------------------------------------------*/
477 
478 void
479 cs_user_join(void);
480 
481 /*----------------------------------------------------------------------------
482  * Define linear solver options.
483  *
484  * This function is called at the setup stage, once user and most model-based
485  * fields are defined.
486  *----------------------------------------------------------------------------*/
487 
488 void
490 
491 /*----------------------------------------------------------------------------*/
497 /*----------------------------------------------------------------------------*/
498 
499 void
501 
502 /*----------------------------------------------------------------------------
503  * Tag bad cells within the mesh based on geometric criteria.
504  *----------------------------------------------------------------------------*/
505 
506 void
508  cs_mesh_quantities_t *mesh_quantities);
509 
510 /*----------------------------------------------------------------------------
511  * Define mesh files to read and optional associated transformations.
512  *----------------------------------------------------------------------------*/
513 
514 void
515 cs_user_mesh_input(void);
516 
517 /*----------------------------------------------------------------------------
518  * Modifiy geometry and mesh.
519  *----------------------------------------------------------------------------*/
520 
521 void
523 
524 /*----------------------------------------------------------------------------
525  * Insert boundary wall into a mesh.
526  *----------------------------------------------------------------------------*/
527 
528 void
530 
531 /*----------------------------------------------------------------------------
532  * Mesh smoothing.
533  *
534  * parameters:
535  * mesh <-> pointer to mesh structure to smoothe
536  *----------------------------------------------------------------------------*/
537 
538 void
540 
541 /*----------------------------------------------------------------------------
542  * Enable or disable mesh saving.
543  *
544  * By default, mesh is saved when modified.
545  *
546  * parameters:
547  * mesh <-> pointer to mesh structure
548  *----------------------------------------------------------------------------*/
549 
550 void
552 
553 /*----------------------------------------------------------------------------
554  * Set options for cutting of warped faces
555  *
556  * parameters:
557  * mesh <-> pointer to mesh structure to smoothe
558  *----------------------------------------------------------------------------*/
559 
560 void
562 
563 /*----------------------------------------------------------------------------*/
571 /*----------------------------------------------------------------------------*/
572 
573 void
575  cs_mesh_quantities_t *mesh_quantities);
576 
577 /*----------------------------------------------------------------------------*/
581 /*----------------------------------------------------------------------------*/
582 
583 void
585 
586 /*----------------------------------------------------------------------------
587  * Select physical model options, including user fields.
588  *
589  * This function is called at the earliest stages of the data setup.
590  *----------------------------------------------------------------------------*/
591 
592 void
593 cs_user_model(void);
594 
595 /*----------------------------------------------------------------------------
596  * Define advanced mesh numbering options.
597  *----------------------------------------------------------------------------*/
598 
599 void
600 cs_user_numbering(void);
601 
602 /*----------------------------------------------------------------------------
603  * Define parallel IO settings.
604  *----------------------------------------------------------------------------*/
605 
606 void
607 cs_user_parallel_io(void);
608 
609 /*----------------------------------------------------------------------------
610  * Define advanced partitioning options.
611  *----------------------------------------------------------------------------*/
612 
613 void
614 cs_user_partition(void);
615 
616 /*----------------------------------------------------------------------------
617  * Define sparse matrix tuning options.
618  *----------------------------------------------------------------------------*/
619 
620 void
622 
623 /*----------------------------------------------------------------------------
624  * Define or modify general numerical and physical user parameters.
625  *
626  * At the calling point of this function, most model-related most variables
627  * and other fields have been defined, so specific settings related to those
628  * fields may be set here.
629  *----------------------------------------------------------------------------*/
630 
631 void
633 
634 /*----------------------------------------------------------------------------
635  * User function for input of radiative transfer module options.
636  *----------------------------------------------------------------------------*/
637 
638 void
640 
641 /*-----------------------------------------------------------------------------
642  * User subroutine for input of radiative transfer boundary conditions
643  *----------------------------------------------------------------------------*/
644 
645 void
647  const int bc_type[],
648  int icodcl[],
649  int isothp[],
650  cs_real_t *tmin,
651  cs_real_t *tmax,
652  cs_real_t *tx,
653  const cs_real_t dt[],
654  cs_real_t rcodcl[],
655  const cs_real_t thwall[],
656  const cs_real_t qincid[],
657  cs_real_t hfcnvp[],
658  cs_real_t flcnvp[],
659  cs_real_t xlamp[],
660  cs_real_t epap[],
661  cs_real_t epsp[],
662  cs_real_t textp[]);
663 
664 /*----------------------------------------------------------------------------
665  * Define periodic faces.
666  *----------------------------------------------------------------------------*/
667 
668 void
669 cs_user_periodicity(void);
670 
671 /*----------------------------------------------------------------------------
672  * Define post-processing writers.
673  *
674  * The default output format and frequency may be configured, and additional
675  * post-processing writers allowing outputs in different formats or with
676  * different format options and output frequency than the main writer may
677  * be defined.
678  *----------------------------------------------------------------------------*/
679 
680 void
682 
683 /*-----------------------------------------------------------------------------
684  * Define monitoring probes and profiles. A profile is seen as a set of probes.
685  *----------------------------------------------------------------------------*/
686 
687 void
689 
690 /*----------------------------------------------------------------------------
691  * Define post-processing meshes.
692  *
693  * The main post-processing meshes may be configured, and additional
694  * post-processing meshes may be defined as a subset of the main mesh's
695  * cells or faces (both interior and boundary).
696  *----------------------------------------------------------------------------*/
697 
698 void
700 
701 /*----------------------------------------------------------------------------
702  * User function for output of values on a post-processing mesh.
703  *----------------------------------------------------------------------------*/
704 
705 void
706 cs_user_postprocess_values(const char *mesh_name,
707  int mesh_id,
708  int cat_id,
709  cs_probe_set_t *probes,
710  cs_lnum_t n_cells,
711  cs_lnum_t n_i_faces,
712  cs_lnum_t n_b_faces,
713  cs_lnum_t n_vertices,
714  const cs_lnum_t cell_list[],
715  const cs_lnum_t i_face_list[],
716  const cs_lnum_t b_face_list[],
717  const cs_lnum_t vertex_list[],
718  const cs_time_step_t *ts);
719 
720 /*----------------------------------------------------------------------------
721  * Override default frequency or calculation end based output.
722  *
723  * This allows fine-grained control of activation or deactivation,
724  *
725  * parameters:
726  * nt_max_abs <-- maximum time step number
727  * nt_cur_abs <-- current time step number
728  * t_cur_abs <-- absolute time at the current time step
729  *----------------------------------------------------------------------------*/
730 
731 void
732 cs_user_postprocess_activate(int nt_max_abs,
733  int nt_cur_abs,
734  double t_cur_abs);
735 
736 /*----------------------------------------------------------------------------
737  * Absorption coefficient for radiative module
738  *----------------------------------------------------------------------------*/
739 
740 void
741 cs_user_rad_transfer_absorption(const int bc_type[],
742  cs_real_t ck[]);
743 
744 /*----------------------------------------------------------------------------
745  * Compute the net radiation flux
746  *----------------------------------------------------------------------------*/
747 
748 void
750  const cs_real_t coefap[],
751  const cs_real_t coefbp[],
752  const cs_real_t cofafp[],
753  const cs_real_t cofbfp[],
754  const cs_real_t twall[],
755  const cs_real_t qincid[],
756  const cs_real_t xlam[],
757  const cs_real_t epa[],
758  const cs_real_t eps[],
759  const cs_real_t ck[],
760  cs_real_t net_flux[]);
761 
762 /*----------------------------------------------------------------------------
763  * Set user solver.
764  *----------------------------------------------------------------------------*/
765 
766 int
767 cs_user_solver_set(void);
768 
769 /*----------------------------------------------------------------------------
770  * Main call to user solver.
771  *----------------------------------------------------------------------------*/
772 
773 void
775  const cs_mesh_quantities_t *mesh_quantities);
776 
777 /*----------------------------------------------------------------------------
778  * Define couplings with other instances of Code_Saturne.
779  *----------------------------------------------------------------------------*/
780 
781 void
783 
784 /*----------------------------------------------------------------------------
785  * Define couplings with SYRTHES code.
786  *----------------------------------------------------------------------------*/
787 
788 void
790 
791 /*----------------------------------------------------------------------------*/
801 /*----------------------------------------------------------------------------*/
802 
803 void
804 cs_user_syrthes_coupling_volume_h(int coupling_id,
805  const char *syrthes_name,
806  cs_lnum_t n_elts,
807  const cs_lnum_t elt_ids[],
808  cs_real_t h_vol[]);
809 
810 /*----------------------------------------------------------------------------
811  * Define time moments.
812  *----------------------------------------------------------------------------*/
813 
814 void
816 
817 /*----------------------------------------------------------------------------
818  * Define rotor/stator model.
819  *----------------------------------------------------------------------------*/
820 
821 void
823 
824 /*----------------------------------------------------------------------------
825  * Define rotor axes, associated cells, and rotor/stator faces.
826  *----------------------------------------------------------------------------*/
827 
828 void
830 
831 /*----------------------------------------------------------------------------
832  * Define rotation velocity of rotor.
833  *----------------------------------------------------------------------------*/
834 
835 void
837 
838 /*----------------------------------------------------------------------------*/
842 /*----------------------------------------------------------------------------*/
843 
844 void
845 cs_user_zones(void);
846 
847 /*----------------------------------------------------------------------------*/
851 /*----------------------------------------------------------------------------*/
852 
853 void
855  const cs_mesh_quantities_t *mesh_quantities,
856  cs_real_t *dt);
857 
858 /*----------------------------------------------------------------------------
859  * Computation of the relaxation time-scale to equilibrium in the frame of
860  * the homogeneous two-phase model.
861  *----------------------------------------------------------------------------*/
862 
863 void
865  const cs_real_t *alpha_eq,
866  const cs_real_t *y_eq,
867  const cs_real_t *z_eq,
868  const cs_real_t *ei,
869  const cs_real_t *v,
870  cs_real_t *relax_tau);
871 
872 /*============================================================================
873  * CDO User function prototypes
874  *============================================================================*/
875 
876 /*----------------------------------------------------------------------------*/
884 /*----------------------------------------------------------------------------*/
885 
886 void
888 
889 /*============================================================================
890  * MEG function prototypes
891  *============================================================================*/
892 
893 /*----------------------------------------------------------------------------*/
906 /*----------------------------------------------------------------------------*/
907 
908 cs_real_t *
910  const char *field_name,
911  const char *condition);
912 
913 /*----------------------------------------------------------------------------*/
921 /*----------------------------------------------------------------------------*/
922 
923 void
925  cs_field_t *f[]);
926 
927 /*----------------------------------------------------------------------------*/
935 /*----------------------------------------------------------------------------*/
936 
937 cs_real_t *
938 cs_meg_initialization(const cs_zone_t *zone,
939  const char *field_name);
940 
941 /*----------------------------------------------------------------------------*/
953 /*----------------------------------------------------------------------------*/
954 
955 cs_real_t *
956 cs_meg_source_terms(const cs_zone_t *zone,
957  const char *name,
958  const char *source_type);
959 
960 /*----------------------------------------------------------------------------*/
972 /*----------------------------------------------------------------------------*/
973 
974 void
976  const char *object_name,
977  cs_real_t xyz[3],
978  cs_real_t t);
979 
980 /*----------------------------------------------------------------------------*/
990 /*----------------------------------------------------------------------------*/
991 
992 void
993 cs_meg_fsi_struct(const char *object_type,
994  const char *name,
995  const cs_real_t fluid_f[],
996  cs_real_t val[]);
997 
998 /*----------------------------------------------------------------------------*/
1002 /*----------------------------------------------------------------------------*/
1003 
1004 void
1005 cs_meg_post_activate(void);
1006 
1007 /*----------------------------------------------------------------------------*/
1015 /*----------------------------------------------------------------------------*/
1016 
1017 void
1018 cs_meg_post_profiles(const char *name,
1019  int n_coords,
1020  cs_real_t coords[][3]);
1021 
1022 /*----------------------------------------------------------------------------*/
1026 /*----------------------------------------------------------------------------*/
1027 
1028 void
1030 
1031 /*----------------------------------------------------------------------------*/
1035 /*----------------------------------------------------------------------------*/
1036 
1037 void
1039 
1040 /*----------------------------------------------------------------------------*/
1044 /*----------------------------------------------------------------------------*/
1045 
1046 void
1048 
1049 /*----------------------------------------------------------------------------*/
1050 
1052 
1053 #endif /* __CS_PROTOTYPES_H__ */
#define restrict
Definition: cs_defs.h:124
#define BEGIN_C_DECLS
Definition: cs_defs.h:492
double cs_real_t
Floating-point value.
Definition: cs_defs.h:304
#define CS_PROCF(x, y)
Definition: cs_defs.h:506
#define END_C_DECLS
Definition: cs_defs.h:493
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
@ t
Definition: cs_field_pointer.h:98
@ xlam
Definition: cs_field_pointer.h:189
@ eps
Definition: cs_field_pointer.h:71
@ h
Definition: cs_field_pointer.h:97
@ epa
Definition: cs_field_pointer.h:190
@ 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:104
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_boundary_conditions(int nvar, int icodcl[], int bc_type[], cs_real_t rcodcl[])
User definition of boundary conditions.
Definition: cs_user_boundary_conditions.c:78
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_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_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:126
void cs_lagr_status(int *model_flag, int *restart_flag, int *frozen_flag)
void cs_user_internal_coupling(void)
Define internal coupling options.
Definition: cs_user_parameters.c:180
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_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_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:148
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:3177
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_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 haltyp(const int *ivoset)
void cs_user_mesh_modify(cs_mesh_t *mesh)
Modify geometry and mesh.
Definition: cs_user_mesh.c:151
void cs_user_postprocess_probes(void)
Define monitoring probes and profiles.
Definition: cs_user_postprocess.c:101
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 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:88
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_time_moments(void)
Define time moments.
Definition: cs_user_parameters.c:165
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_meg_post_activate(void)
This function is used to activate postprocessing writers.
Definition: cs_meg_post_output.c:64
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_user_radiative_transfer_parameters(void)
User function for input of radiative transfer module options.
Definition: cs_user_radiative_transfer.c:77
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
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
int cs_add_model_field_indexes(int f_id)
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_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
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_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
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:3158
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_meg_immersed_boundaries_inout(int *ipenal, const char *object_name, cs_real_t xyz[3], cs_real_t t)
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:81
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_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_user_postprocess_writers(void)
Define post-processing writers.
Definition: cs_user_postprocess.c:69
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_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_extra_operations_initialize(cs_domain_t *domain)
Initialize variables.
Definition: cs_user_extra_operations.c:90
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_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_gwf_setup(cs_domain_t *domain)
Specify for each soil and tracer how is defined each term of the the tracer equation....
Definition: cs_user_gwf.c:83
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:125
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:142
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)
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:114
integer, dimension(:), pointer, save itypfb
boundary condition type at the boundary face ifac (see user subroutine cs_user_boundary_conditions)
Definition: pointe.f90:100
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:288
Definition: mesh.f90:26
Structure storing the main features of the computational domain and pointers to the main geometrical ...
Definition: cs_domain.h:88
Field descriptor.
Definition: cs_field.h:125
Definition: cs_mesh_quantities.h:89
Definition: cs_mesh.h:84
time step descriptor
Definition: cs_time_step.h:64
Definition: cs_zone.h:55