stardis

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

stardis-fluid.h (1717B)


      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_FLUID_H
     17 #define SDIS_FLUID_H
     18 
     19 #include <sdis.h>
     20 
     21 #include <rsys/rsys.h>
     22 #include <rsys/str.h>
     23 
     24 struct stardis;
     25 struct mem_allocator;
     26 
     27 /*******************************************************************************
     28  * Fluid data
     29  ******************************************************************************/
     30 struct fluid {
     31   struct str name;
     32   double rho; /* Volumic mass */
     33   double cp; /* Calorific capacity */
     34   double tinit;
     35   double imposed_temperature;
     36   double t0; /* End time of tinit */
     37   int is_outside; /* the fluid is used for a boundary */
     38   int is_green; /* green computation (nothing to do with fluid itself) */
     39   unsigned desc_id;
     40   unsigned fluid_id;
     41 };
     42 
     43 res_T
     44 create_solver_fluid
     45   (struct stardis* stardis,
     46    const struct fluid* fluid_props);
     47 
     48 res_T
     49 init_fluid(struct mem_allocator* allocator, struct fluid** dst);
     50 
     51 void
     52 release_fluid
     53   (struct fluid* desc,
     54    struct mem_allocator* allocator);
     55 
     56 res_T
     57 str_print_fluid(struct str* str, const struct fluid* s);
     58 
     59 #endif