stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

stardis-sfconnect-prog.h (2614B)


      1 /* Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com)
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 3 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program. If not, see <http://www.gnu.org/licenses/>. */
     15 
     16 #ifndef SDIS_SF_CONNECT_PROG_H
     17 #define SDIS_SF_CONNECT_PROG_H
     18 
     19 #include <rsys/rsys.h>
     20 #include <rsys/str.h>
     21 
     22 #include "stardis-prog-properties.h"
     23 
     24 struct stardis;
     25 struct mem_allocator;
     26 struct program;
     27 
     28 /*******************************************************************************
     29  * Solid-Fluid prog data
     30  ******************************************************************************/
     31 struct solid_fluid_connect_prog {
     32   void* prog_data; /* result of the create() call */
     33   struct str name;
     34   struct str prog_name;
     35   size_t argc;
     36   char** argv;
     37   int is_outside; /* the fluid is used for a boundary */
     38   unsigned desc_id; /* id of the boundary; meaningful if is_outside */
     39   unsigned connection_id;
     40   /* lib handle and function ptrs */
     41   struct program* program;
     42   void* (*create)
     43     (const struct stardis_description_create_context*, void*, size_t, char**);
     44   void (*release)(void*);
     45   double (*ref_temp)(const struct stardis_interface_fragment*, void*);
     46   double (*emissivity)
     47     (const struct stardis_interface_fragment*, const unsigned src_id, void*);
     48   double (*alpha)
     49     (const struct stardis_interface_fragment*, const unsigned src_id, void*);
     50   double (*hc)(const struct stardis_interface_fragment*, void*);
     51   double (*flux)(const struct stardis_interface_fragment*, void*);
     52   double (*hmax)(void*);
     53   double* (*t_range)(void*, double trange[2]);
     54 };
     55 
     56 res_T
     57 create_solver_sf_connect_prog
     58   (struct stardis* stardis,
     59    const struct solid_fluid_connect_prog* connect);
     60 
     61 res_T
     62 init_sf_connect_prog
     63   (struct mem_allocator* allocator,
     64    struct solid_fluid_connect_prog** dst);
     65 
     66 void
     67 release_sf_connect_prog
     68   (struct solid_fluid_connect_prog* connect,
     69    struct mem_allocator* allocator);
     70 
     71 res_T
     72 str_print_sf_connect_prog
     73   (struct str* str,
     74    const struct solid_fluid_connect_prog* connect);
     75 
     76 double
     77 sf_connect_prog_get_hmax
     78   (const struct solid_fluid_connect_prog* connect);
     79 
     80 #endif