6.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-2020 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  * Compute distance to wall by solving a 3d diffusion equation.
90  *----------------------------------------------------------------------------*/
91 
92 extern void CS_PROCF (distpr, DISTPR)
93 (
94  const int *itypfb, /* <-- boudnary face types */
95  cs_real_t *distpa /* <-- wall distance */
96 );
97 
98 /*----------------------------------------------------------------------------
99  * Developer function for output of variables on a post-processing mesh
100  *----------------------------------------------------------------------------*/
101 
102 extern void CS_PROCF (dvvpst, DVVPST)
103 (
104  const int *nummai, /* <-- number or post-processing mesh */
105  const int *numtyp, /* <-- number or post-processing type
106  * (-1 as volume, -2 as boundary, or nummai) */
107  const int *nvar, /* <-- number of variables */
108  const cs_lnum_t *ncelps, /* <-- number of post-processed cells */
109  const cs_lnum_t *nfbrps, /* <-- number of post processed boundary faces */
110  const cs_lnum_t lstcel[], /* <-- list of post-processed cells */
111  const cs_lnum_t lstfbr[], /* <-- list of post-processed boundary faces */
112  cs_real_t tracel[], /* --- work array for output cells */
113  cs_real_t trafbr[] /* --- work array for output boundary faces */
114 );
115 
116 /*----------------------------------------------------------------------------
117  * Find the nearest cell's center from a node
118  *----------------------------------------------------------------------------*/
119 
120 extern void CS_PROCF (findpt, FINDPT)
121 (
122  const cs_lnum_t *ncelet, /* <-- number of extended (real + ghost) cells */
123  const cs_lnum_t *ncel, /* <-- number of cells */
124  const cs_real_t *xyzcen, /* <-- cell centers */
125  const cs_real_t *xx, /* <-- node coordinate X */
126  const cs_real_t *yy, /* <-- node coordinate Y */
127  const cs_real_t *zz, /* <-- node coordinate Z */
128  cs_lnum_t *node, /* --> node we are looking for, zero if error */
129  int *ndrang /* --> rank of associated process */
130 );
131 
132 /*----------------------------------------------------------------------------
133  * Check necessity of extended mesh from FORTRAN options.
134  *
135  * Interface Fortran :
136  *
137  * SUBROUTINE HALTYP (IVOSET)
138  * *****************
139  *
140  * INTEGER IVOSET : <-- : Indicator of necessity of extended mesh
141  *----------------------------------------------------------------------------*/
142 
143 extern void
144 CS_PROCF (haltyp, HALTYP)(const int *ivoset);
145 
146 /*----------------------------------------------------------------------------
147  * Main Fortran options initialization
148  *----------------------------------------------------------------------------*/
149 
150 extern void CS_PROCF (initi1, INITI1)
151 (
152  void
153 );
154 
155 /*----------------------------------------------------------------------------
156  * User function for enthalpy <-> temperature conversion
157  *----------------------------------------------------------------------------*/
158 
159 void CS_PROCF (usthht, USTHHT)
160 (
161  const int *mode, /* <-- -1 : t -> h ; 1 : h -> t */
162  cs_real_t *enthal, /* <-- enthalpy */
163  cs_real_t *temper /* <-- temperature */
164 );
165 
166 /*----------------------------------------------------------------------------*/
176 /*----------------------------------------------------------------------------*/
177 
178 void
179 cs_user_head_losses(const cs_zone_t *zone,
180  cs_real_t cku[][6]);
181 
182 /*----------------------------------------------------------------------------
183  * Absorption coefficient for radiative module
184  *----------------------------------------------------------------------------*/
185 
186 void
187 cs_user_rad_transfer_absorption(const int bc_type[],
188  cs_real_t ck[]);
189 
190 /*----------------------------------------------------------------------------
191  * Compute the net radiation flux
192  *----------------------------------------------------------------------------*/
193 
194 void
196  const cs_real_t coefap[],
197  const cs_real_t coefbp[],
198  const cs_real_t cofafp[],
199  const cs_real_t cofbfp[],
200  const cs_real_t twall[],
201  const cs_real_t qincid[],
202  const cs_real_t xlam[],
203  const cs_real_t epa[],
204  const cs_real_t eps[],
205  const cs_real_t ck[],
206  cs_real_t net_flux[]);
207 
208 /*----------------------------------------------------------------------------
209  * Convert temperature to enthalpy at boundary
210  *----------------------------------------------------------------------------*/
211 
212 void CS_PROCF (b_t_to_h, B_T_TO_H)
213 (
214  const cs_lnum_t *nlst, /* --> number of faces in list */
215  const cs_lnum_t *lstfac, /* --> list of boundary faces at which
216  conversion is requested */
217  const cs_real_t *t_b, /* --> temperature at boundary */
218  cs_real_t *h_b /* --> enthalpy at boundary */
219 );
220 
221 /*----------------------------------------------------------------------------
222  * Convert enthalpy to temperature at cells
223  *----------------------------------------------------------------------------*/
224 
225 void CS_PROCF (c_h_to_t, C_H_TO_T)
226 (
227  const cs_real_t *h, /* --> enthalpy */
228  cs_real_t *t /* --> temperature */
229 );
230 
231 /*----------------------------------------------------------------------------
232  * Convert enthalpy to temperature at boundary.
233  *
234  * If conversion is done in-place, h and t may point to the same arrays.
235  *
236  * parameters:
237  * h <-- enthalpy
238  * t --> temperature
239  *----------------------------------------------------------------------------*/
240 
241 void CS_PROCF (b_h_to_t, B_H_TO_T)
242 (
243  const cs_real_t *h, /* --> enthalpy */
244  cs_real_t *t /* --> temperature */
245 );
246 
247 /*----------------------------------------------------------------------------
248  * Add field indexes associated with a new non-user solved variable,
249  * with default options
250  *
251  * parameters:
252  * f_id <-- field id
253  *
254  * returns:
255  * scalar number for defined field
256  *----------------------------------------------------------------------------*/
257 
258 int
260 
261 /*----------------------------------------------------------------------------
262  * Return Lagrangian model status.
263  *
264  * parameters:
265  * model_flag --> 0 without Lagrangian, 1 or 2 with Lagrangian
266  * restart_flag --> 1 for Lagrangian restart, 0 otherwise
267  * frozen_flag --> 1 for frozen Eulerian flow, 0 otherwise
268  *----------------------------------------------------------------------------*/
269 
270 void
271 cs_lagr_status(int *model_flag,
272  int *restart_flag,
273  int *frozen_flag);
274 
275 /*============================================================================
276  * User function prototypes
277  *============================================================================*/
278 
279 /*----------------------------------------------------------------------------
280  * Data Entry of the 1D wall thermal module.
281  *----------------------------------------------------------------------------*/
282 
283 void
284 cs_user_1d_wall_thermal(int iappel,
285  int isuit1);
286 
287 /*----------------------------------------------------------------------------
288  * This function is called at each time step for boundary conditions.
289  *----------------------------------------------------------------------------*/
290 
291 void
293  int icodcl[],
294  int bc_type[],
295  cs_real_t rcodcl[]);
296 
297 /*----------------------------------------------------------------------------*/
309 /*----------------------------------------------------------------------------*/
310 
311 void
313 
314 /*----------------------------------------------------------------------------*/
323 /*----------------------------------------------------------------------------*/
324 
325 void
327 
328 /*----------------------------------------------------------------------------*/
337 /*----------------------------------------------------------------------------*/
338 
339 void
341 
342 /*----------------------------------------------------------------------------*/
348 /*----------------------------------------------------------------------------*/
349 
350 void
352 
353 /*----------------------------------------------------------------------------*/
359 /*----------------------------------------------------------------------------*/
360 
361 void
363 
364 /*----------------------------------------------------------------------------*/
373 /*----------------------------------------------------------------------------*/
374 
375 void
377 
378 /*----------------------------------------------------------------------------*/
387 /*----------------------------------------------------------------------------*/
388 
389 void
391 
392 /*----------------------------------------------------------------------------*/
398 /*----------------------------------------------------------------------------*/
399 
400 void
402 
403 /*----------------------------------------------------------------------------*/
413 /*----------------------------------------------------------------------------*/
414 
415 void
417  int f_id,
418  cs_real_t *st_exp,
419  cs_real_t *st_imp);
420 
421 /*----------------------------------------------------------------------------*/
431 /*----------------------------------------------------------------------------*/
432 
433 void
435 
436 /*----------------------------------------------------------------------------
437  * Define mesh joinings.
438  *----------------------------------------------------------------------------*/
439 
440 void
441 cs_user_join(void);
442 
443 /*----------------------------------------------------------------------------
444  * Define linear solver options.
445  *
446  * This function is called at the setup stage, once user and most model-based
447  * fields are defined.
448  *----------------------------------------------------------------------------*/
449 
450 void
452 
453 /*----------------------------------------------------------------------------*/
459 /*----------------------------------------------------------------------------*/
460 
461 void
463 
464 /*----------------------------------------------------------------------------
465  * Tag bad cells within the mesh based on geometric criteria.
466  *----------------------------------------------------------------------------*/
467 
468 void
470  cs_mesh_quantities_t *mesh_quantities);
471 
472 /*----------------------------------------------------------------------------
473  * Define mesh files to read and optional associated transformations.
474  *----------------------------------------------------------------------------*/
475 
476 void
477 cs_user_mesh_input(void);
478 
479 /*----------------------------------------------------------------------------
480  * Modifiy geometry and mesh.
481  *----------------------------------------------------------------------------*/
482 
483 void
485 
486 /*----------------------------------------------------------------------------
487  * Insert boundary wall into a mesh.
488  *----------------------------------------------------------------------------*/
489 
490 void
492 
493 /*----------------------------------------------------------------------------
494  * Mesh smoothing.
495  *
496  * parameters:
497  * mesh <-> pointer to mesh structure to smoothe
498  *----------------------------------------------------------------------------*/
499 
500 void
502 
503 /*----------------------------------------------------------------------------
504  * Enable or disable mesh saving.
505  *
506  * By default, mesh is saved when modified.
507  *
508  * parameters:
509  * mesh <-> pointer to mesh structure
510  *----------------------------------------------------------------------------*/
511 
512 void
514 
515 /*----------------------------------------------------------------------------
516  * Set options for cutting of warped faces
517  *
518  * parameters:
519  * mesh <-> pointer to mesh structure to smoothe
520  *----------------------------------------------------------------------------*/
521 
522 void
524 
525 /*----------------------------------------------------------------------------*/
533 /*----------------------------------------------------------------------------*/
534 
535 void
537  cs_mesh_quantities_t *mesh_quantities);
538 
539 /*----------------------------------------------------------------------------*/
543 /*----------------------------------------------------------------------------*/
544 
545 void
547 
548 /*----------------------------------------------------------------------------
549  * Select physical model options, including user fields.
550  *
551  * This function is called at the earliest stages of the data setup.
552  *----------------------------------------------------------------------------*/
553 
554 void
555 cs_user_model(void);
556 
557 /*----------------------------------------------------------------------------
558  * Define advanced mesh numbering options.
559  *----------------------------------------------------------------------------*/
560 
561 void
562 cs_user_numbering(void);
563 
564 /*----------------------------------------------------------------------------
565  * Define parallel IO settings.
566  *----------------------------------------------------------------------------*/
567 
568 void
569 cs_user_parallel_io(void);
570 
571 /*----------------------------------------------------------------------------
572  * Define advanced partitioning options.
573  *----------------------------------------------------------------------------*/
574 
575 void
576 cs_user_partition(void);
577 
578 /*----------------------------------------------------------------------------
579  * Define sparse matrix tuning options.
580  *----------------------------------------------------------------------------*/
581 
582 void
584 
585 /*----------------------------------------------------------------------------
586  * Define or modify general numerical and physical user parameters.
587  *
588  * At the calling point of this function, most model-related most variables
589  * and other fields have been defined, so specific settings related to those
590  * fields may be set here.
591  *----------------------------------------------------------------------------*/
592 
593 void
595 
596 /*----------------------------------------------------------------------------
597  * User function for input of radiative transfer module options.
598  *----------------------------------------------------------------------------*/
599 
600 void
602 
603 /*-----------------------------------------------------------------------------
604  * User subroutine for input of radiative transfer boundary conditions
605  *----------------------------------------------------------------------------*/
606 
607 void
609  const int bc_type[],
610  int icodcl[],
611  int isothp[],
612  cs_real_t *tmin,
613  cs_real_t *tmax,
614  cs_real_t *tx,
615  const cs_real_t dt[],
616  cs_real_t rcodcl[],
617  const cs_real_t thwall[],
618  const cs_real_t qincid[],
619  cs_real_t hfcnvp[],
620  cs_real_t flcnvp[],
621  cs_real_t xlamp[],
622  cs_real_t epap[],
623  cs_real_t epsp[],
624  cs_real_t textp[],
625  cs_real_t tintp[]);
626 
627 /*----------------------------------------------------------------------------
628  * Define periodic faces.
629  *----------------------------------------------------------------------------*/
630 
631 void
632 cs_user_periodicity(void);
633 
634 /*----------------------------------------------------------------------------
635  * Define post-processing writers.
636  *
637  * The default output format and frequency may be configured, and additional
638  * post-processing writers allowing outputs in different formats or with
639  * different format options and output frequency than the main writer may
640  * be defined.
641  *----------------------------------------------------------------------------*/
642 
643 void
645 
646 /*-----------------------------------------------------------------------------
647  * Define monitoring probes and profiles. A profile is seen as a set of probes.
648  *----------------------------------------------------------------------------*/
649 
650 void
652 
653 /*----------------------------------------------------------------------------
654  * Define post-processing meshes.
655  *
656  * The main post-processing meshes may be configured, and additional
657  * post-processing meshes may be defined as a subset of the main mesh's
658  * cells or faces (both interior and boundary).
659  *----------------------------------------------------------------------------*/
660 
661 void
663 
664 /*----------------------------------------------------------------------------
665  * User function for output of values on a post-processing mesh.
666  *----------------------------------------------------------------------------*/
667 
668 void
669 cs_user_postprocess_values(const char *mesh_name,
670  int mesh_id,
671  int cat_id,
672  cs_probe_set_t *probes,
673  cs_lnum_t n_cells,
674  cs_lnum_t n_i_faces,
675  cs_lnum_t n_b_faces,
676  cs_lnum_t n_vertices,
677  const cs_lnum_t cell_list[],
678  const cs_lnum_t i_face_list[],
679  const cs_lnum_t b_face_list[],
680  const cs_lnum_t vertex_list[],
681  const cs_time_step_t *ts);
682 
683 /*----------------------------------------------------------------------------
684  * Override default frequency or calculation end based output.
685  *
686  * This allows fine-grained control of activation or deactivation,
687  *
688  * parameters:
689  * nt_max_abs <-- maximum time step number
690  * nt_cur_abs <-- current time step number
691  * t_cur_abs <-- absolute time at the current time step
692  *----------------------------------------------------------------------------*/
693 
694 void
695 cs_user_postprocess_activate(int nt_max_abs,
696  int nt_cur_abs,
697  double t_cur_abs);
698 
699 /*----------------------------------------------------------------------------
700  * Set user solver.
701  *----------------------------------------------------------------------------*/
702 
703 int
704 cs_user_solver_set(void);
705 
706 /*----------------------------------------------------------------------------
707  * Main call to user solver.
708  *----------------------------------------------------------------------------*/
709 
710 void
712  const cs_mesh_quantities_t *mesh_quantities);
713 
714 /*----------------------------------------------------------------------------
715  * Define couplings with other instances of Code_Saturne.
716  *----------------------------------------------------------------------------*/
717 
718 void
720 
721 /*----------------------------------------------------------------------------
722  * Define couplings with SYRTHES code.
723  *----------------------------------------------------------------------------*/
724 
725 void
727 
728 /*----------------------------------------------------------------------------*/
738 /*----------------------------------------------------------------------------*/
739 
740 void
741 cs_user_syrthes_coupling_volume_h(int coupling_id,
742  const char *syrthes_name,
743  cs_lnum_t n_elts,
744  const cs_lnum_t elt_ids[],
745  cs_real_t h_vol[]);
746 
747 /*----------------------------------------------------------------------------
748  * Define time moments.
749  *----------------------------------------------------------------------------*/
750 
751 void
753 
754 /*----------------------------------------------------------------------------
755  * Define rotor/stator model.
756  *----------------------------------------------------------------------------*/
757 
758 void
760 
761 /*----------------------------------------------------------------------------
762  * Define rotor axes, associated cells, and rotor/stator faces.
763  *----------------------------------------------------------------------------*/
764 
765 void
767 
768 /*----------------------------------------------------------------------------
769  * Define rotation velocity of rotor.
770  *----------------------------------------------------------------------------*/
771 
772 void
774 
775 /*----------------------------------------------------------------------------*/
779 /*----------------------------------------------------------------------------*/
780 
781 void
782 cs_user_zones(void);
783 
784 /*----------------------------------------------------------------------------*/
788 /*----------------------------------------------------------------------------*/
789 
790 void
792  const cs_mesh_quantities_t *mesh_quantities,
793  cs_real_t *dt);
794 
795 /*----------------------------------------------------------------------------
796  * Computation of the relaxation time-scale to equilibrium in the frame of
797  * the homogeneous two-phase model.
798  *----------------------------------------------------------------------------*/
799 
800 void
802  const cs_real_t *alpha_eq,
803  const cs_real_t *y_eq,
804  const cs_real_t *z_eq,
805  const cs_real_t *ei,
806  const cs_real_t *v,
807  cs_real_t *relax_tau);
808 
809 /*============================================================================
810  * CDO User function prototypes
811  *============================================================================*/
812 
813 /*----------------------------------------------------------------------------*/
821 /*----------------------------------------------------------------------------*/
822 
823 void
825 
826 /*----------------------------------------------------------------------------*/
827 
828 /*============================================================================
829  * MEG function prototypes
830  *============================================================================*/
831 
832 /*----------------------------------------------------------------------------*/
845 /*----------------------------------------------------------------------------*/
846 
847 cs_real_t *
849  const char *field_name,
850  const char *condition);
851 
852 /*----------------------------------------------------------------------------*/
860 /*----------------------------------------------------------------------------*/
861 
862 void
864  cs_field_t *f[]);
865 
866 /*----------------------------------------------------------------------------*/
874 /*----------------------------------------------------------------------------*/
875 
876 cs_real_t *
877 cs_meg_initialization(const cs_zone_t *zone,
878  const char *field_name);
879 
880 /*----------------------------------------------------------------------------*/
892 /*----------------------------------------------------------------------------*/
893 
894 cs_real_t *
895 cs_meg_source_terms(const cs_zone_t *zone,
896  const char *name,
897  const char *source_type);
898 
899 /*----------------------------------------------------------------------------*/
911 /*----------------------------------------------------------------------------*/
912 
913 void
915  const char *object_name,
916  cs_real_t xyz[3],
917  cs_real_t t);
918 
919 /*----------------------------------------------------------------------------*/
929 /*----------------------------------------------------------------------------*/
930 
931 void
932 cs_meg_fsi_struct(const char *object_type,
933  const char *name,
934  const cs_real_t fluid_f[],
935  cs_real_t val[]);
936 
937 /*----------------------------------------------------------------------------*/
941 /*----------------------------------------------------------------------------*/
942 
943 void
945 
946 /*----------------------------------------------------------------------------*/
954 /*----------------------------------------------------------------------------*/
955 
956 void
957 cs_meg_post_profiles(const char *name,
958  int n_coords,
959  cs_real_t coords[][3]);
960 
961 /*----------------------------------------------------------------------------*/
965 /*----------------------------------------------------------------------------*/
966 
967 void
969 
970 /*----------------------------------------------------------------------------*/
974 /*----------------------------------------------------------------------------*/
975 
976 void
978 
979 /*----------------------------------------------------------------------------*/
983 /*----------------------------------------------------------------------------*/
984 
985 void
987 
988 /*----------------------------------------------------------------------------*/
989 
991 
992 #endif /* __CS_PROTOTYPES_H__ */
cs_user_source_terms
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
cs_user_internal_coupling_add_volumes
void cs_user_internal_coupling_add_volumes(cs_mesh_t *mesh)
Define volumes as internal coupling zones.
Definition: cs_internal_coupling.c:2940
cs_user_numbering
void cs_user_numbering(void)
Define advanced mesh numbering options.
Definition: cs_user_performance_tuning.c:74
cs_meg_source_terms
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
cs_user_solver
void cs_user_solver(const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities)
Main call to user solver.
Definition: cs_user_solver.c:92
cs_user_initialization
void cs_user_initialization(cs_domain_t *domain)
This function is called one time step to initialize problem.
Definition: cs_user_initialization.c:88
xlam
@ xlam
Definition: cs_field_pointer.h:189
cs_domain_t
Structure storing the main features of the computational domain and pointers to the main geometrical ...
Definition: cs_domain.h:88
cs_user_hgn_thermo_relax_time
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
t_b
@ t_b
Definition: cs_field_pointer.h:99
c_h_to_t
void c_h_to_t(const cs_real_t *h, cs_real_t *t)
distpr
void distpr(const int *itypfb, cs_real_t *distpa)
cs_domain.h
cs_zone_t
Definition: cs_zone.h:55
cs_user_physical_properties
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
dimens::nvar
integer, save nvar
number of solved variables (must be lower than nvarmx)
Definition: dimens.f90:42
initi1
void initi1(void)
Definition: initi1.f90:29
cs_user_turbomachinery_rotor
void cs_user_turbomachinery_rotor(void)
Define rotor axes, associated cells, and rotor/stator faces.
Definition: cs_user_turbomachinery.c:90
cs_user_turbomachinery_set_rotation_velocity
void cs_user_turbomachinery_set_rotation_velocity(void)
Define rotation velocity of rotor.
Definition: cs_user_turbomachinery.c:103
cs_user_finalize_setup
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
csinit
void csinit(const int *irgpar, const int *nrgpar)
cs_user_paramedmem_define_fields
void cs_user_paramedmem_define_fields(void)
Define fields to couple with ParaMEDMEM.
Definition: cs_user_paramedmem_coupling.c:105
cs_user_radiative_transfer_bcs
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[], cs_real_t tintp[])
User definition of radiative transfer boundary conditions.
Definition: cs_user_radiative_transfer_bcs.c:146
cs_user_mesh_save
void cs_user_mesh_save(cs_mesh_t *mesh)
Enable or disable mesh saving.
Definition: cs_user_mesh.c:183
cs_user_model
void cs_user_model(void)
Select physical model options, including user fields.
Definition: cs_user_parameters.c:84
dt
@ dt
Definition: cs_field_pointer.h:65
cs_user_postprocess_probes
void cs_user_postprocess_probes(void)
Define monitoring probes and profiles.
Definition: cs_user_postprocess.c:101
cs_user_saturne_coupling
void cs_user_saturne_coupling(void)
Define couplings with other instances of Code_Saturne.
Definition: cs_user_coupling.c:79
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:493
cs_mesh_bad_cells.h
cs_user_mesh_input
void cs_user_mesh_input(void)
Define mesh files to read and optional associated transformations.
Definition: cs_user_mesh.c:82
pointe::itypfb
integer, dimension(:), pointer, save itypfb
boundary condition type at the boundary face ifac (see user subroutine cs_user_boundary_conditions)
Definition: pointe.f90:100
cs_user_mesh_boundary
void cs_user_mesh_boundary(cs_mesh_t *mesh)
Insert boundaries into a mesh.
Definition: cs_user_mesh.c:136
cs_user_internal_coupling_from_disjoint_meshes
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:2959
cs_user_join
void cs_user_join(void)
Define mesh joinings.
Definition: cs_user_mesh.c:95
cs_user_paramedmem_define_couplings
void cs_user_paramedmem_define_couplings(void)
Define ParaMEDMEM coupling(s)
Definition: cs_user_paramedmem_coupling.c:81
atimbr::v
double precision, dimension(:,:,:), allocatable v
Definition: atimbr.f90:114
cs_user_turbomachinery
void cs_user_turbomachinery(void)
Define rotor/stator model.
Definition: cs_user_turbomachinery.c:77
cs_add_model_field_indexes
int cs_add_model_field_indexes(int f_id)
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:304
cs_user_internal_coupling
void cs_user_internal_coupling(void)
Define internal coupling options.
Definition: cs_user_parameters.c:180
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:492
cs_user_solver_set
int cs_user_solver_set(void)
Set user solver.
Definition: cs_user_solver.c:75
cs_user_postprocess_meshes
void cs_user_postprocess_meshes(void)
Define post-processing meshes.
Definition: cs_user_postprocess.c:86
cs_mesh_quantities.h
cs_user_mesh_cartesian_define
void cs_user_mesh_cartesian_define(void)
Define a cartesian mesh.
Definition: cs_user_mesh.c:232
cs_user_mesh_smoothe
void cs_user_mesh_smoothe(cs_mesh_t *mesh)
Mesh smoothing.
Definition: cs_user_mesh.c:166
epa
@ epa
Definition: cs_field_pointer.h:190
cs_mesh_quantities_t
Definition: cs_mesh_quantities.h:89
mesh::xyzcen
double precision, dimension(:,:), pointer xyzcen
coordinate of the cell centers
Definition: mesh.f90:110
cs_user_partition
void cs_user_partition(void)
Define advanced partitioning options.
Definition: cs_user_performance_tuning.c:87
cs_lagr_status
void cs_lagr_status(int *model_flag, int *restart_flag, int *frozen_flag)
cs_user_boundary_conditions
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
cs_meg_post_profiles
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
mesh
Definition: mesh.f90:26
cs_user_mesh_warping
void cs_user_mesh_warping(void)
Set options for cutting of warped faces.
Definition: cs_user_mesh.c:121
cs_user_rad_transfer_net_flux
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
cs_user_head_losses
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
cs_user_time_moments
void cs_user_time_moments(void)
Define time moments.
Definition: cs_user_parameters.c:165
cs_mesh.h
cs_user_scaling_elec
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
haltyp
void haltyp(const int *ivoset)
cs_user_extra_operations_initialize
void cs_user_extra_operations_initialize(cs_domain_t *domain)
Initialize variables.
Definition: cs_user_extra_operations.c:90
cs_meg_immersed_boundaries_inout
void cs_meg_immersed_boundaries_inout(int *ipenal, const char *object_name, cs_real_t xyz[3], cs_real_t t)
optcal::isuit1
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:298
eps
@ eps
Definition: cs_field_pointer.h:71
cs_volume_zone.h
cs_user_mesh_modify
void cs_user_mesh_modify(cs_mesh_t *mesh)
Modify geometry and mesh.
Definition: cs_user_mesh.c:151
b_t_to_h
void b_t_to_h(const cs_lnum_t *nlst, const cs_lnum_t *lstfac, const cs_real_t *t_b, cs_real_t *h_b)
cs_user_1d_wall_thermal
void cs_user_1d_wall_thermal(int iappel, int isuit1)
Definition: cs_user_1d_wall_thermal.c:88
cs_user_radiative_transfer_parameters
void cs_user_radiative_transfer_parameters(void)
User function for input of radiative transfer module options.
Definition: cs_user_radiative_transfer.c:77
mesh::ncelet
integer, save ncelet
number of extended (real + ghost of the 'halo') cells. See Note 1: ghost cells - (halos)
Definition: mesh.f90:46
findpt
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)
mesh::ncel
integer, save ncel
number of real cells in the mesh
Definition: mesh.f90:50
cs_time_step_t
time step descriptor
Definition: cs_time_step.h:64
cs_field.h
cs_user_periodicity
void cs_user_periodicity(void)
Define periodic faces.
Definition: cs_user_mesh.c:108
cpthp1
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)
cs_user_extra_operations_finalize
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
cs_user_syrthes_coupling
void cs_user_syrthes_coupling(void)
Define couplings with SYRTHES code.
Definition: cs_user_coupling.c:95
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_probe_set_t
struct _cs_probe_set_t cs_probe_set_t
Definition: cs_probe.h:53
cs_probe.h
cs_user_matrix_tuning
void cs_user_matrix_tuning(void)
Define sparse matrix tuning options.
Definition: cs_user_performance_tuning.c:113
caltri
void caltri(void)
Definition: caltri.f90:36
CS_PROCF
#define CS_PROCF(x, y)
Definition: cs_defs.h:506
b_h_to_t
void b_h_to_t(const cs_real_t *h, cs_real_t *t)
cs_user_extra_operations
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
cs_user_rad_transfer_absorption
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
dvvpst
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[])
cs_user_postprocess_writers
void cs_user_postprocess_writers(void)
Define post-processing writers.
Definition: cs_user_postprocess.c:69
cs_user_parallel_io
void cs_user_parallel_io(void)
Define parallel IO settings.
Definition: cs_user_performance_tuning.c:100
t
@ t
Definition: cs_field_pointer.h:98
cs_user_parameters
void cs_user_parameters(cs_domain_t *domain)
Define or modify general numerical and physical user parameters.
Definition: cs_user_parameters.c:107
cs_meg_post_activate
void cs_meg_post_activate(void)
This function is used to activate postprocessing writers.
Definition: cs_meg_post_output.c:64
cs_user_syrthes_coupling_volume_h
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
cs_user_porosity
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
cs_user_postprocess_activate
void cs_user_postprocess_activate(int nt_max_abs, int nt_cur_abs, double t_cur_abs)
Definition: cs_user_postprocess.c:177
cs_meg_volume_function
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
cs_meg_boundary_function
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
cs_user_mesh_modify_partial
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
cs_user_zones
void cs_user_zones(void)
Define volume and surface zones.
Definition: cs_user_zones.c:65
cs_user_linear_solvers
void cs_user_linear_solvers(void)
Define linear solver options.
Definition: cs_user_parameters.c:148
cs_user_postprocess_values
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
h
@ h
Definition: cs_field_pointer.h:97
cs_field_t
Field descriptor.
Definition: cs_field.h:125
cs_user_mesh_bad_cells_tag
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
cs_user_paramedmem_define_meshes
void cs_user_paramedmem_define_meshes(void)
Define coupled meshes.
Definition: cs_user_paramedmem_coupling.c:93
cs_mesh_t
Definition: cs_mesh.h:84
cs_base.h
cs_meg_fsi_struct
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
usthht
void usthht(const int *mode, cs_real_t *enthal, cs_real_t *temper)
cs_user_gwf_setup
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
cs_meg_initialization
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