OpenLB 1.7
Loading...
Searching...
No Matches
multiPhaseUnitConverter.hh
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2017 Max Gaedtke, Albert Mink
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24
25#ifndef MULTIPHASEUNITCONVERTER_HH
26#define MULTIPHASEUNITCONVERTER_HH
27
28#include <fstream>
29#include <iostream>
30#include <unistd.h>
31#include "core/singleton.h"
32#include "io/fileName.h"
33
34// All OpenLB code is contained in this namespace.
35namespace olb {
36
37template <typename T, typename DESCRIPTOR>
39{
40 clout << "----------------- MultiPhaseUnitConverter information ------------------" << std::endl;
41 clout << "-- Parameters:" << std::endl;
42 clout << "Resolution: N= " << this->getResolution() << std::endl;
43 clout << "Lattice velocity: latticeU= " << this->getCharLatticeVelocity() << std::endl;
44 clout << "Lattice relaxation frequency: omega= " << this->getLatticeRelaxationFrequency() << std::endl;
45 clout << "Lattice relaxation time: tau= " << this->getLatticeRelaxationTime() << std::endl;
46 clout << "Characteristical length(m): charL= " << this->getCharPhysLength() << std::endl;
47 clout << "Characteristical speed(m/s): charU= " << this->getCharPhysVelocity() << std::endl;
48 clout << "Phys. kinematic viscosity(m^2/s): charNu= " << this->getPhysViscosity() << std::endl;
49 clout << "Characteristical pressure(N/m^2): charPressure= " << this->getCharPhysPressure() << std::endl;
50 clout << "Reynolds number: reynoldsNumber= " << this->getReynoldsNumber() << std::endl;
51 clout << "Phys. Delta X(m): physDeltaX= " << this->getPhysDeltaX() << std::endl;
52 clout << "Phys. Delta T(s): physDeltaT= " << this->getPhysDeltaT() << std::endl;
53 clout << "Phys. Surface Tension(J/m^2): physSurfaceTension= " << getPhysSurfaceTension() << std::endl;
54 clout << "Characteristical Phys. Temperature(K): charPhysTemperature= " << getCharPhysTemperature() << std::endl;
55
56 clout << "----------------- Conversion factors:-----------------------------------" << std::endl;
57 clout << "Voxel length(m): physDeltaX= " << this->getConversionFactorLength() << std::endl;
58 clout << "Time step(s): physDeltaT= " << this->getConversionFactorTime() << std::endl;
59 clout << "Velocity factor(m/s): physVelocity= " << this->getConversionFactorVelocity() << std::endl;
60 clout << "Density factor(kg/m^3): physDensity= " << this->getConversionFactorDensity() << std::endl;
61 clout << "Mass factor(kg): physMass= " << this->getConversionFactorMass() << std::endl;
62 clout << "Viscosity factor(m^2/s): physViscosity= " << this->getConversionFactorViscosity() << std::endl;
63 clout << "Force factor(N): physForce= " << this->getConversionFactorForce() << std::endl;
64 clout << "Pressure factor(N/m^2): physPressure= " << this->getConversionFactorPressure() << std::endl;
65 clout << "Equation of state a(Jm^3/mol^2): physEoSa= " << getConversionFactorEoSa() << std::endl;
66 clout << "Equation of state b(m^3/mol): physEoSb= " << getConversionFactorEoSb() << std::endl;
67 clout << "Molar mass(kg/mol): physMolarMass= " << getConversionFactorMolarMass() << std::endl;
68 clout << "Surface tension(J/m^2): physSurfaceTension= " << getConversionFactorSurfaceTension() << std::endl;
69 clout << "Temperature(K): physTemperature= " << getConversionFactorTemperature() << std::endl;
70
71 clout << "------------------------------------------------------------------------" << std::endl;
72
73}
74
75} // namespace olb
76
77#endif
void print() const override
nice terminal output for conversion factors, characteristical and physical data
These functions help you to create file names.
Top level namespace for all of OpenLB.
Definition of singletons: global, publicly available information.