atrstm_rdgfa.h (1398B)
1 /* Copyright (C) 2022, 2023 |Méso|Star> (contact@meso-star.com) 2 * Copyright (C) 2020, 2021 Centre National de la Recherche Scientifique 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 16 17 #ifndef ATRSTM_RDGFA_H 18 #define ATRSTM_RDGFA_H 19 20 #include <rsys/rsys.h> 21 #include <math.h> 22 23 static FINLINE double /* In nanometer */ 24 compute_gyration_radius 25 (const double fractal_prefactor, 26 const double fractal_dimension, 27 const double soot_primary_particles_count, 28 const double soot_primary_particles_diameter) 29 { 30 const double kf = fractal_prefactor; 31 const double Df = fractal_dimension; 32 const double Np = soot_primary_particles_count; 33 const double Dp = soot_primary_particles_diameter; 34 const double Rg = 0.5 * Dp * pow(Np/kf, 1.0/Df); /* [nm] */ 35 return Rg; 36 } 37 38 #endif /* ATRSTM_RDGFA_H */ 39