Skip to content
Snippets Groups Projects
Commit 1e1c41c2 authored by Konstantin Kutscher's avatar Konstantin Kutscher
Browse files

Merge branch 'feature/SquarePressure' into develop

# Conflicts:
#	source/Applications/ConvectionOfVortex/cov.cpp
parents 31aa8d19 8a299282
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ void run()
//////////////////////////////////////////////////////////////////////////
//DLR-F16 test
//dx_coarse = 0.003 mm
string pathname = "d:/temp/ConvectionOfVortex_0.003_4th";
int endTime = 10000;
double outTime = 10;
......@@ -28,6 +29,14 @@ void run()
LBMReal rhoLB = 0.0;
LBMReal nuLB = 8.66025e-6;
double yFactor = 1.0;
//string pathname = "d:/temp/ConvectionOfVortex_0.003_square";
//int endTime = 20;
//double outTime = 10;
//LBMReal dx = 0.003;
//LBMReal rhoLB = 0.0;
//LBMReal nuLB = 8.66025e-6;
//////////////////////////////////////////////////////////////////////////
////dx_coarse = 0.0015 mm
//string pathname = "d:/temp/ConvectionOfVortex_0.0015";
......@@ -38,6 +47,7 @@ void run()
//LBMReal nuLB = 8.66025e-6*2.0;
////////////////////////////////////////////////////////////////////////////
//dx_coarse = 0.00075 mm
//string pathname = "d:/temp/ConvectionOfVortex_0.00075_4th_moments";
//double endTime = 2000;
//double outTime = 10;
......@@ -45,6 +55,14 @@ void run()
//LBMReal rhoLB = 0.0;
//LBMReal nuLB = 8.66025e-6*4.0;
//double yFactor = 4.0;
string pathname = "d:/temp/ConvectionOfVortex_0.00075_moments";
//double endTime = 160;
//double outTime = 160;
//LBMReal dx = 0.00075;
//LBMReal rhoLB = 0.0;
//LBMReal nuLB = 8.66025e-6*4.0;
//////////////////////////////////////////////////////////////////////////
////dx_coarse = 0.000375 mm
//string pathname = "d:/temp/ConvectionOfVortex_0.000375";
......@@ -147,6 +165,7 @@ void run()
//SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetInterpolationProcessor());
SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetMomentsInterpolationProcessor());
//dynamicPointerCast<CompressibleOffsetMomentsInterpolationProcessor>(iProcessor)->setBulkOmegaToOmega(true);
//SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetSquarePressureInterpolationProcessor());
SetConnectorsBlockVisitor setConnsVisitor(comm, true, D3Q27System::ENDDIR, nuLB, iProcessor);
UBLOG(logINFO, "SetConnectorsBlockVisitor:start");
......@@ -257,16 +276,16 @@ void run()
SPtr<UbScheduler> nupsSch(new UbScheduler(10, 30, 100));
std::shared_ptr<NUPSCounterCoProcessor> nupsCoProcessor(new NUPSCounterCoProcessor(grid, nupsSch, numOfThreads, comm));
SPtr<UbScheduler> tavSch(new UbScheduler(1, 0, endTime));
SPtr<TimeAveragedValuesCoProcessor> tav(new TimeAveragedValuesCoProcessor(grid, pathname, WbWriterVtkXmlBinary::getInstance(), tavSch, comm,
TimeAveragedValuesCoProcessor::Density | TimeAveragedValuesCoProcessor::Velocity | TimeAveragedValuesCoProcessor::Fluctuations));
tav->setWithGhostLayer(true);
//SPtr<UbScheduler> tavSch(new UbScheduler(1, 0, endTime));
//SPtr<TimeAveragedValuesCoProcessor> tav(new TimeAveragedValuesCoProcessor(grid, pathname, WbWriterVtkXmlBinary::getInstance(), tavSch, comm,
// TimeAveragedValuesCoProcessor::Density | TimeAveragedValuesCoProcessor::Velocity | TimeAveragedValuesCoProcessor::Fluctuations));
//tav->setWithGhostLayer(true);
SPtr<UbScheduler> stepGhostLayer(new UbScheduler(1));
SPtr<Calculator> calculator(new BasicCalculator(grid, stepGhostLayer, endTime));
calculator->addCoProcessor(nupsCoProcessor);
calculator->addCoProcessor(writeMQCoProcessor);
calculator->addCoProcessor(tav);
//calculator->addCoProcessor(tav);
//omp_set_num_threads(1);
......
......@@ -177,6 +177,7 @@
#include <LBM/IncompressibleOffsetInterpolationProcessor.h>
#include <LBM/CompressibleOffsetInterpolationProcessor.h>
#include <LBM/CompressibleOffsetMomentsInterpolationProcessor.h>
#include <LBM/CompressibleOffsetSquarePressureInterpolationProcessor.h>
#include <LBM/InterpolationHelper.h>
#include <LBM/InterpolationProcessor.h>
//#include <LBM/D3Q27OffsetInterpolationProcessor.h>
......
......@@ -10,7 +10,6 @@
//////////////////////////////////////////////////////////////////////////
class CompressibleOffsetInterpolationProcessor;
typedef SPtr<CompressibleOffsetInterpolationProcessor> CompressibleOffsetInterpolationProcessorPtr;
class CompressibleOffsetInterpolationProcessor : public InterpolationProcessor
{
......
......@@ -10,7 +10,6 @@
//////////////////////////////////////////////////////////////////////////
class CompressibleOffsetMomentsInterpolationProcessor;
typedef SPtr<CompressibleOffsetMomentsInterpolationProcessor> CompressibleOffsetMomentsInterpolationProcessorPtr;
class CompressibleOffsetMomentsInterpolationProcessor : public InterpolationProcessor
{
......
#ifndef CompressibleOffsetSquarePressureInterpolationProcessor_H_
#define CompressibleOffsetSquarePressureInterpolationProcessor_H_
#include "InterpolationProcessor.h"
#include "D3Q27System.h"
//////////////////////////////////////////////////////////////////////////
//it works only for cascaded LBM
//super compact interpolation method by Martin Geier
//////////////////////////////////////////////////////////////////////////
class CompressibleOffsetSquarePressureInterpolationProcessor;
class CompressibleOffsetSquarePressureInterpolationProcessor : public InterpolationProcessor
{
public:
CompressibleOffsetSquarePressureInterpolationProcessor();
CompressibleOffsetSquarePressureInterpolationProcessor(LBMReal omegaC, LBMReal omegaF);
virtual ~CompressibleOffsetSquarePressureInterpolationProcessor();
InterpolationProcessorPtr clone();
void setOmegas(LBMReal omegaC, LBMReal omegaF);
void interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF);
void interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF, LBMReal xoff, LBMReal yoff, LBMReal zoff);
void interpolateFineToCoarse(D3Q27ICell& icellF, LBMReal* icellC);
void interpolateFineToCoarse(D3Q27ICell& icellF, LBMReal* icellC, LBMReal xoff, LBMReal yoff, LBMReal zoff);
void setBulkOmegaToOmega(bool value);
protected:
private:
LBMReal omegaC, omegaF;
LBMReal a0, ax, ay, az, axx, ayy, azz, axy, axz, ayz, b0, bx, by, bz, bxx, byy, bzz, bxy, bxz, byz, c0, cx, cy, cz, cxx, cyy, czz, cxy, cxz, cyz, axyz, bxyz, cxyz;
LBMReal xoff, yoff, zoff;
LBMReal xoff_sq, yoff_sq, zoff_sq;
LBMReal press_SWT, press_NWT, press_NET, press_SET, press_SWB, press_NWB, press_NEB, press_SEB;
LBMReal f_E, f_N, f_T, f_NE, f_SE, f_BE, f_TE, f_TN, f_BN, f_TNE, f_TNW, f_TSE, f_TSW, f_ZERO;
LBMReal x_E, x_N, x_T, x_NE, x_SE, x_BE, x_TE, x_TN, x_BN, x_TNE, x_TNW, x_TSE, x_TSW, x_ZERO;
LBMReal y_E, y_N, y_T, y_NE, y_SE, y_BE, y_TE, y_TN, y_BN, y_TNE, y_TNW, y_TSE, y_TSW, y_ZERO;
LBMReal z_E, z_N, z_T, z_NE, z_SE, z_BE, z_TE, z_TN, z_BN, z_TNE, z_TNW, z_TSE, z_TSW, z_ZERO;
LBMReal xy_E, xy_N, xy_T, xy_NE, xy_SE, xy_BE, xy_TE, xy_TN, xy_BN, xy_TNE, xy_TNW, xy_TSE, xy_TSW/*, xy_ZERO*/;
LBMReal xz_E, xz_N, xz_T, xz_NE, xz_SE, xz_BE, xz_TE, xz_TN, xz_BN, xz_TNE, xz_TNW, xz_TSE, xz_TSW/*, xz_ZERO*/;
LBMReal yz_E, yz_N, yz_T, yz_NE, yz_SE, yz_BE, yz_TE, yz_TN, yz_BN, yz_TNE, yz_TNW, yz_TSE, yz_TSW/*, yz_ZERO*/;
LBMReal kxyAverage, kyzAverage, kxzAverage, kxxMyyAverage, kxxMzzAverage;
LBMReal a,b,c;
// bulk viscosity
bool bulkOmegaToOmega;
LBMReal OxxPyyPzzC;
LBMReal OxxPyyPzzF;
void setOffsets(LBMReal xoff, LBMReal yoff, LBMReal zoff);
void calcMoments(const LBMReal* const f, LBMReal omega, LBMReal& rho, LBMReal& vx1, LBMReal& vx2, LBMReal& vx3,
LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz);
void calcInterpolatedCoefficiets(const D3Q27ICell& icell, LBMReal omega, LBMReal eps_new);
void calcInterpolatedNodeCF(LBMReal* f, LBMReal omega, LBMReal x, LBMReal y, LBMReal z, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs);
LBMReal calcPressBSW();
LBMReal calcPressTSW();
LBMReal calcPressTSE();
LBMReal calcPressBSE();
LBMReal calcPressBNW();
LBMReal calcPressTNW();
LBMReal calcPressTNE();
LBMReal calcPressBNE();
void calcInterpolatedNodeFC(LBMReal* f, LBMReal omega);
void calcInterpolatedVelocity(LBMReal x, LBMReal y, LBMReal z,LBMReal& vx1, LBMReal& vx2, LBMReal& vx3);
void calcInterpolatedShearStress(LBMReal x, LBMReal y, LBMReal z,LBMReal& tauxx, LBMReal& tauyy, LBMReal& tauzz,LBMReal& tauxy, LBMReal& tauxz, LBMReal& tauyz);
};
//////////////////////////////////////////////////////////////////////////
inline void CompressibleOffsetSquarePressureInterpolationProcessor::interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF)
{
this->interpolateCoarseToFine(icellC, icellF, 0.0, 0.0, 0.0);
}
//////////////////////////////////////////////////////////////////////////
inline void CompressibleOffsetSquarePressureInterpolationProcessor::interpolateFineToCoarse(D3Q27ICell& icellF, LBMReal* icellC)
{
this->interpolateFineToCoarse(icellF, icellC, 0.0, 0.0, 0.0);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment