diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index 87284a4e28..e4b4f54867 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,20 +173,7 @@ void Foam::ParticleCollector::initConcentricCircles() { // Set 4 quadrants for single sector cases nS = 4; - - vector tangent = Zero; - scalar magTangent = 0.0; - - Random rnd(1234); - while (magTangent < small) - { - vector v = rnd.sample01(); - - tangent = v - (v & normal_[0])*normal_[0]; - magTangent = mag(tangent); - } - - refDir = tangent/magTangent; + refDir = normalised(perpendicular(normal_[0])); } scalar dTheta = 5.0; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index 9d80457c48..8d851929d3 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -83,26 +83,6 @@ Foam::word Foam::ThermoSurfaceFilm::interactionTypeStr // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -template -Foam::vector Foam::ThermoSurfaceFilm::tangentVector -( - const vector& v -) const -{ - vector tangent = Zero; - scalar magTangent = 0.0; - - while (magTangent < small) - { - vector vTest = rndGen_.sample01(); - tangent = vTest - (vTest & v)*v; - magTangent = mag(tangent); - } - - return tangent/magTangent; -} - - template Foam::vector Foam::ThermoSurfaceFilm::splashDirection ( @@ -358,7 +338,7 @@ void Foam::ThermoSurfaceFilm::splashInteraction const vector& nf = pp.faceNormals()[facei]; // Determine direction vectors tangential to patch normal - const vector tanVec1 = tangentVector(nf); + const vector tanVec1 = normalised(perpendicular(nf)); const vector tanVec2 = nf^tanVec1; // Retrieve parcel properties diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H index 168e0a75ed..f54fc1e884 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -151,9 +151,6 @@ protected: // Protected Member Functions - //- Return a vector tangential to input vector, v - vector tangentVector(const vector& v) const; - //- Return splashed parcel direction vector splashDirection (