BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
units.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_UNITS_HPP
13#define BELFEM_UNITS_HPP
14
15
16#include "typedefs.hpp"
17#include "constants.hpp"
18
19#ifdef BELFEM_GCC
20#pragma GCC diagnostic push
21#pragma GCC diagnostic ignored "-Wunused-variable"
22#endif
23
24#define BELFEM_TREF 298.15
25#define BELFEM_PREF 100000.0
26
27//------------------------------------------------------------------------------
28
29namespace belfem
30{
31 namespace constant
32 {
33 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
34 // Metric Units
35 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
36
37 const real l = 0.001 ; // liter
38 const real km = 1000 ; // kilometers
39 const real bar = 1.0e5 ;
40 const real atm = 1.01325e5 ;
41 const real rpm = constant::pi / 30.0 ; // rpm in rad/s
42
43 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44 // Freedom Units
45 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
46
47 const real in = 0.0254 ; // inch
48 const real ft = 12.0 * in ; // foot
49 const real mi = 5280.0 * ft ; // mile
50 const real gal = 231.0 * in * in * in ; // us gallon
51 const real lb = 0.45359237 ; // pound
52 const real lbf = lb * constant::g0; // pound force
53 const real psi = lbf / ( in * in ) ; // pound per square inch
54 const real oz = gal / 128.0 ; // us fluid ounce
55
56 }
57}
58
59//------------------------------------------------------------------------------
60#ifdef BELFEM_GCC
61#pragma GCC diagnostic pop
62#endif
63#endif //BELFEM_UNITS_HPP
const real oz
Definition units.hpp:54
const real mi
Definition units.hpp:49
const real rpm
Definition units.hpp:41
const real atm
Definition units.hpp:40
const real km
Definition units.hpp:38
const real lb
Definition units.hpp:51
const real pi
circle number
Definition constants.hpp:41
const real bar
Definition units.hpp:39
const real g0
earth gravitational acceleration at sea level in m/s^2 https://physics.nist.gov/cgi-bin/cuu/Value?...
Definition constants.hpp:192
const real gal
Definition units.hpp:50
const real ft
Definition units.hpp:48
const real psi
Definition units.hpp:53
const real lbf
Definition units.hpp:52
const real in
Definition units.hpp:47
const real l
Definition units.hpp:37
USER GUIDES:
Definition cl_Capacitor.cpp:16
double real
Definition typedefs.hpp:36