mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
77
ReleaseNotes-dev
Normal file
77
ReleaseNotes-dev
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# -*- mode: org; -*-
|
||||||
|
#
|
||||||
|
#+TITLE: OpenFOAM release notes for version dev
|
||||||
|
#+AUTHOR: OpenCFD Ltd.
|
||||||
|
#+DATE: TBA
|
||||||
|
#+LINK: http://www.openfoam.com
|
||||||
|
#+OPTIONS: author:nil ^:{}
|
||||||
|
# Copyright (c) 2010 OpenCFD Ltd.
|
||||||
|
|
||||||
|
* Overview
|
||||||
|
OpenFOAM-dev is the latest major release of OpenFOAM including many new
|
||||||
|
developments a number of bug-fixes. This release passes our standard tests
|
||||||
|
and the tutorials have been broadly checked. Please report any bugs by
|
||||||
|
following the link: http://www.openfoam.com/bugs.
|
||||||
|
|
||||||
|
* GNU/Linux version
|
||||||
|
This release of OpenFOAM is distributed primarily in 2 ways: (1) as a Debian
|
||||||
|
pack containing binaries and source; (2) from the SourceForge source code
|
||||||
|
repository (see [[./README.org][README]]).
|
||||||
|
|
||||||
|
The Ubuntu/Debian pack is available for 32 and 64 bit versions of the 10.04
|
||||||
|
LTS operating system using the system compiler and libraries that will be
|
||||||
|
installed automatically from standard Debian packs.
|
||||||
|
|
||||||
|
To use the source version from the SourceForge repository, we provide a source
|
||||||
|
pack of third-party packages that can be compiled on the user's system. This
|
||||||
|
does not include =gcc=, since the system installed version is typically
|
||||||
|
sufficient, but includes =paraview-3.8.0=, =openmpi-1.4.1=, =scotch_5.1=,
|
||||||
|
=metis-5.0pre2=, =ParMetis-3.1= and =ParMGridGen-1.0=.
|
||||||
|
|
||||||
|
* Library developments
|
||||||
|
There have been a number of developments to the libraries to support the
|
||||||
|
extension of functionality in solver and utility applications.
|
||||||
|
*** Core library
|
||||||
|
+ Large number of code refinements and consistency improvements to support
|
||||||
|
other developments.
|
||||||
|
*** Turbulence modelling
|
||||||
|
*** Thermo-physical Models
|
||||||
|
*** DSMC
|
||||||
|
*** Dynamic Mesh
|
||||||
|
*** Numerics
|
||||||
|
|
||||||
|
* Solvers
|
||||||
|
A number of new solvers have been developed for a range of engineering
|
||||||
|
applications. There has been a set of improvements to certain classes of
|
||||||
|
solver that are introduced in this release.
|
||||||
|
*** *New* Solvers
|
||||||
|
+ ...
|
||||||
|
*** Modifications to multiphase and buoyant solvers
|
||||||
|
+ ...
|
||||||
|
*** Modifications to solvers for sensible enthalpy
|
||||||
|
+ ...
|
||||||
|
*** Modifications to steady-state compressible solvers
|
||||||
|
+ ...
|
||||||
|
*** Other modifications
|
||||||
|
+ ...
|
||||||
|
|
||||||
|
* Boundary conditions
|
||||||
|
New boundary conditions have been introduced to support new applications in
|
||||||
|
OpenFOAM.
|
||||||
|
+ ...
|
||||||
|
|
||||||
|
* Utilities
|
||||||
|
There have been some utilities added and updated in this release.
|
||||||
|
*** *New* utilities
|
||||||
|
+ ...
|
||||||
|
*** Updated utilities
|
||||||
|
+ ...
|
||||||
|
|
||||||
|
* Post-processing
|
||||||
|
+ =foamToEnsight=: new =-nodeValues= option to generate and output nodal
|
||||||
|
field data.
|
||||||
|
|
||||||
|
* New tutorials
|
||||||
|
There is a large number of new tutorials to support the new solvers in the
|
||||||
|
release.
|
||||||
|
+ ...
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,6 +30,15 @@ Description
|
|||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
template<class ListType>
|
||||||
|
void printInfo(const ListType& lst)
|
||||||
|
{
|
||||||
|
Info<< "addr: " << lst.addressing() << nl
|
||||||
|
<< "list: " << lst << nl
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// Main program:
|
// Main program:
|
||||||
|
|
||||||
@ -42,8 +51,7 @@ int main(int argc, char *argv[])
|
|||||||
completeList[i] = 0.1*i;
|
completeList[i] = 0.1*i;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "raw : " << completeList << nl
|
Info<< "raw : " << completeList << nl << endl;
|
||||||
<< endl;
|
|
||||||
|
|
||||||
|
|
||||||
List<label> addresses(5);
|
List<label> addresses(5);
|
||||||
@ -53,11 +61,9 @@ int main(int argc, char *argv[])
|
|||||||
addresses[3] = 8;
|
addresses[3] = 8;
|
||||||
addresses[4] = 5;
|
addresses[4] = 5;
|
||||||
|
|
||||||
IndirectList<double> idl(completeList, addresses);
|
IndirectList<double> idl1(completeList, addresses);
|
||||||
|
|
||||||
Info<< "addr: " << idl.addressing() << nl
|
printInfo(idl1);
|
||||||
<< "list: " << idl() << nl
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
addresses[4] = 1;
|
addresses[4] = 1;
|
||||||
addresses[3] = 0;
|
addresses[3] = 0;
|
||||||
@ -65,11 +71,26 @@ int main(int argc, char *argv[])
|
|||||||
addresses[1] = 8;
|
addresses[1] = 8;
|
||||||
addresses[0] = 5;
|
addresses[0] = 5;
|
||||||
|
|
||||||
idl.resetAddressing(addresses.xfer());
|
idl1.resetAddressing(addresses.xfer());
|
||||||
|
|
||||||
Info<< "addr: " << idl.addressing() << nl
|
printInfo(idl1);
|
||||||
<< "list: " << idl() << nl
|
|
||||||
<< endl;
|
// test copying
|
||||||
|
UIndirectList<double> uidl1(idl1);
|
||||||
|
IndirectList<double> idl2(uidl1);
|
||||||
|
IndirectList<double> idl3(idl2);
|
||||||
|
|
||||||
|
printInfo(uidl1);
|
||||||
|
|
||||||
|
idl1.resetAddressing(List<label>());
|
||||||
|
// idl2.resetAddressing(List<label>());
|
||||||
|
|
||||||
|
Info<<"after resetAddressing:" << nl << endl;
|
||||||
|
|
||||||
|
printInfo(uidl1);
|
||||||
|
printInfo(idl1);
|
||||||
|
printInfo(idl2);
|
||||||
|
printInfo(idl3);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -1,164 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::IndirectList2
|
|
||||||
|
|
||||||
Description
|
|
||||||
A List with indirect addressing.
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
IndirectListI.H
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef IndirectList2_H
|
|
||||||
#define IndirectList2_H
|
|
||||||
|
|
||||||
#include "UIndirectList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class IndirectListAddressing Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
//- A helper class for storing addresses.
|
|
||||||
class IndirectListAddressing
|
|
||||||
{
|
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Storage for the list addressing
|
|
||||||
List<label> addressing_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
IndirectListAddressing(const IndirectListAddressing&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const IndirectListAddressing&);
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct by copying the addressing array
|
|
||||||
explicit inline IndirectListAddressing(const UList<label>& addr);
|
|
||||||
|
|
||||||
//- Construct by transferring addressing array
|
|
||||||
explicit inline IndirectListAddressing(const Xfer<List<label> >& addr);
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the list addressing
|
|
||||||
inline const List<label>& addressing() const;
|
|
||||||
|
|
||||||
// Edit
|
|
||||||
|
|
||||||
//- Reset addressing
|
|
||||||
inline void resetAddressing(const UList<label>&);
|
|
||||||
inline void resetAddressing(const Xfer<List<label> >&);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class IndirectList2 Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
class IndirectList2
|
|
||||||
:
|
|
||||||
private IndirectListAddressing,
|
|
||||||
public UIndirectList<T>
|
|
||||||
{
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disable default assignment operator
|
|
||||||
void operator=(const IndirectList2<T>&);
|
|
||||||
|
|
||||||
//- Disable assignment from UIndirectList
|
|
||||||
void operator=(const UIndirectList<T>&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given the complete list and the addressing array
|
|
||||||
inline IndirectList2(const UList<T>&, const UList<label>&);
|
|
||||||
|
|
||||||
//- Construct given the complete list and by transferring addressing
|
|
||||||
inline IndirectList2(const UList<T>&, const Xfer<List<label> >&);
|
|
||||||
|
|
||||||
//- Copy constructor
|
|
||||||
inline IndirectList2(const IndirectList2<T>&);
|
|
||||||
|
|
||||||
//- Construct from UIndirectList
|
|
||||||
explicit inline IndirectList2(const UIndirectList<T>&);
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the list addressing
|
|
||||||
using UIndirectList<T>::addressing;
|
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
|
||||||
|
|
||||||
//- Reset addressing
|
|
||||||
using IndirectListAddressing::resetAddressing;
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
|
||||||
|
|
||||||
//- Assignment operator
|
|
||||||
using UIndirectList<T>::operator=;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "IndirectList2I.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,136 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
inline Foam::IndirectListAddressing::IndirectListAddressing
|
|
||||||
(
|
|
||||||
const UList<label>& addr
|
|
||||||
)
|
|
||||||
:
|
|
||||||
addressing_(addr)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
inline Foam::IndirectListAddressing::IndirectListAddressing
|
|
||||||
(
|
|
||||||
const Xfer<List<label> >& addr
|
|
||||||
)
|
|
||||||
:
|
|
||||||
addressing_(addr)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline Foam::IndirectList2<T>::IndirectList2
|
|
||||||
(
|
|
||||||
const UList<T>& completeList,
|
|
||||||
const UList<label>& addr
|
|
||||||
)
|
|
||||||
:
|
|
||||||
IndirectListAddressing(addr),
|
|
||||||
UIndirectList<T>
|
|
||||||
(
|
|
||||||
completeList,
|
|
||||||
IndirectListAddressing::addressing()
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline Foam::IndirectList2<T>::IndirectList2
|
|
||||||
(
|
|
||||||
const UList<T>& completeList,
|
|
||||||
const Xfer<List<label> >& addr
|
|
||||||
)
|
|
||||||
:
|
|
||||||
IndirectListAddressing(addr),
|
|
||||||
UIndirectList<T>
|
|
||||||
(
|
|
||||||
completeList,
|
|
||||||
IndirectListAddressing::addressing()
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline Foam::IndirectList2<T>::IndirectList2
|
|
||||||
(
|
|
||||||
const IndirectList2<T>& lst
|
|
||||||
)
|
|
||||||
:
|
|
||||||
IndirectListAddressing(lst.addressing()),
|
|
||||||
UIndirectList<T>
|
|
||||||
(
|
|
||||||
lst.completeList(),
|
|
||||||
IndirectListAddressing::addressing()
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline Foam::IndirectList2<T>::IndirectList2
|
|
||||||
(
|
|
||||||
const UIndirectList<T>& lst
|
|
||||||
)
|
|
||||||
:
|
|
||||||
IndirectListAddressing(lst.addressing()),
|
|
||||||
UIndirectList<T>
|
|
||||||
(
|
|
||||||
lst.completeList(),
|
|
||||||
IndirectListAddressing::addressing()
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
inline const Foam::List<Foam::label>&
|
|
||||||
Foam::IndirectListAddressing::addressing() const
|
|
||||||
{
|
|
||||||
return addressing_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void Foam::IndirectListAddressing::resetAddressing
|
|
||||||
(
|
|
||||||
const UList<label>& addr
|
|
||||||
)
|
|
||||||
{
|
|
||||||
addressing_ = addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void Foam::IndirectListAddressing::resetAddressing
|
|
||||||
(
|
|
||||||
const Xfer<List<label> >& addr
|
|
||||||
)
|
|
||||||
{
|
|
||||||
addressing_.transfer(addr());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "IndirectList2.H"
|
|
||||||
#include "IOstreams.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
|
||||||
|
|
||||||
template<class ListType>
|
|
||||||
void printInfo(const ListType& lst)
|
|
||||||
{
|
|
||||||
Info<< "addr: " << lst.addressing() << nl
|
|
||||||
<< "list: " << lst << nl
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Main program:
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
List<double> completeList(10);
|
|
||||||
|
|
||||||
forAll(completeList, i)
|
|
||||||
{
|
|
||||||
completeList[i] = 0.1*i;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "raw : " << completeList << nl << endl;
|
|
||||||
|
|
||||||
|
|
||||||
List<label> addresses(5);
|
|
||||||
addresses[0] = 1;
|
|
||||||
addresses[1] = 0;
|
|
||||||
addresses[2] = 7;
|
|
||||||
addresses[3] = 8;
|
|
||||||
addresses[4] = 5;
|
|
||||||
|
|
||||||
IndirectList2<double> idl1(completeList, addresses);
|
|
||||||
|
|
||||||
printInfo(idl1);
|
|
||||||
|
|
||||||
addresses[4] = 1;
|
|
||||||
addresses[3] = 0;
|
|
||||||
addresses[2] = 7;
|
|
||||||
addresses[1] = 8;
|
|
||||||
addresses[0] = 5;
|
|
||||||
|
|
||||||
idl1.resetAddressing(addresses.xfer());
|
|
||||||
|
|
||||||
printInfo(idl1);
|
|
||||||
|
|
||||||
// test copying
|
|
||||||
UIndirectList<double> uidl1(idl1);
|
|
||||||
IndirectList2<double> idl2(uidl1);
|
|
||||||
IndirectList2<double> idl3(idl2);
|
|
||||||
|
|
||||||
printInfo(uidl1);
|
|
||||||
|
|
||||||
idl1.resetAddressing(List<label>());
|
|
||||||
// idl2.resetAddressing(List<label>());
|
|
||||||
|
|
||||||
Info<<"after resetAddressing:" << nl << endl;
|
|
||||||
|
|
||||||
printInfo(uidl1);
|
|
||||||
printInfo(idl1);
|
|
||||||
printInfo(idl2);
|
|
||||||
printInfo(idl3);
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
IndirectListTest2.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/IndirectListTest2
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
|
|
||||||
/* EXE_LIBS = -lfiniteVolume */
|
|
||||||
@ -2,6 +2,5 @@ itoa.C
|
|||||||
ensightMesh.C
|
ensightMesh.C
|
||||||
ensightParticlePositions.C
|
ensightParticlePositions.C
|
||||||
foamToEnsight.C
|
foamToEnsight.C
|
||||||
ensightWriteBinary.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/foamToEnsight
|
EXE = $(FOAM_APPBIN)/foamToEnsight
|
||||||
|
|||||||
@ -44,15 +44,6 @@ namespace Foam
|
|||||||
|
|
||||||
class cellSets
|
class cellSets
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
cellSets(const cellSets&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const cellSets&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
label nHexesWedges;
|
label nHexesWedges;
|
||||||
|
|||||||
@ -0,0 +1,156 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::ensightAsciiStream
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
ensightAsciiStream.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef ensightAsciiStream_H
|
||||||
|
#define ensightAsciiStream_H
|
||||||
|
|
||||||
|
#include "ensightStream.H"
|
||||||
|
#include "OFstream.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class ensightAsciiStream Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class ensightAsciiStream
|
||||||
|
:
|
||||||
|
public ensightStream
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Description of data_
|
||||||
|
OFstream str_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
ensightAsciiStream(const ensightAsciiStream&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const ensightAsciiStream&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
ensightAsciiStream(const fileName& f, const Time& runTime)
|
||||||
|
:
|
||||||
|
ensightStream(f),
|
||||||
|
str_
|
||||||
|
(
|
||||||
|
f,
|
||||||
|
runTime.writeFormat(),
|
||||||
|
runTime.writeVersion(),
|
||||||
|
IOstream::UNCOMPRESSED
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
str_.setf(ios_base::scientific, ios_base::floatfield);
|
||||||
|
str_.precision(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~ensightAsciiStream()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
virtual void write(const char* c)
|
||||||
|
{
|
||||||
|
str_ << c << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void write(const int v)
|
||||||
|
{
|
||||||
|
str_ << setw(10) << v << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void write(const scalarField& sf)
|
||||||
|
{
|
||||||
|
forAll(sf, i)
|
||||||
|
{
|
||||||
|
if (mag(sf[i]) >= scalar(floatScalarVSMALL))
|
||||||
|
{
|
||||||
|
str_ << setw(12) << sf[i] << nl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str_ << setw(12) << scalar(0) << nl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void write(const List<int>& sf)
|
||||||
|
{
|
||||||
|
forAll(sf, i)
|
||||||
|
{
|
||||||
|
str_ << setw(10) << sf[i];
|
||||||
|
}
|
||||||
|
str_<< nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void writePartHeader(const label partI)
|
||||||
|
{
|
||||||
|
str_<< "part" << nl
|
||||||
|
<< setw(10) << partI << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
// Friend Functions
|
||||||
|
|
||||||
|
// Friend Operators
|
||||||
|
|
||||||
|
// IOstream Operators
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,158 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::ensightBinaryStream
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
ensightBinaryStream.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef ensightBinaryStream_H
|
||||||
|
#define ensightBinaryStream_H
|
||||||
|
|
||||||
|
#include "ensightStream.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class ensightBinaryStream Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class ensightBinaryStream
|
||||||
|
:
|
||||||
|
public ensightStream
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Description of data_
|
||||||
|
autoPtr<std::ofstream> str_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
ensightBinaryStream(const ensightBinaryStream&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const ensightBinaryStream&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
ensightBinaryStream(const fileName& f, const Time&)
|
||||||
|
:
|
||||||
|
ensightStream(f),
|
||||||
|
str_
|
||||||
|
(
|
||||||
|
new std::ofstream
|
||||||
|
(
|
||||||
|
f.c_str(),
|
||||||
|
ios_base::out | ios_base::binary | ios_base::trunc
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~ensightBinaryStream()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
virtual void write(const char* val)
|
||||||
|
{
|
||||||
|
char buffer[80] = {0};
|
||||||
|
strcpy(buffer, val);
|
||||||
|
str_().write(buffer, 80*sizeof(char));
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void write(const int val)
|
||||||
|
{
|
||||||
|
str_().write(reinterpret_cast<const char*>(&val), sizeof(int));
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void write(const scalarField& sf)
|
||||||
|
{
|
||||||
|
if (sf.size())
|
||||||
|
{
|
||||||
|
List<float> temp(sf.size());
|
||||||
|
|
||||||
|
forAll(sf, i)
|
||||||
|
{
|
||||||
|
temp[i] = float(sf[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
str_().write
|
||||||
|
(
|
||||||
|
reinterpret_cast<const char*>(temp.begin()),
|
||||||
|
sf.size()*sizeof(float)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void write(const List<int>& sf)
|
||||||
|
{
|
||||||
|
str_().write
|
||||||
|
(
|
||||||
|
reinterpret_cast<const char*>(sf.begin()),
|
||||||
|
sf.size()*sizeof(int)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void writePartHeader(const label partI)
|
||||||
|
{
|
||||||
|
write("part");
|
||||||
|
write(partI);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
// Friend Functions
|
||||||
|
|
||||||
|
// Friend Operators
|
||||||
|
|
||||||
|
// IOstream Operators
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -29,28 +29,14 @@ License
|
|||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
#include "itoa.H"
|
#include "itoa.H"
|
||||||
#include "ensightWriteBinary.H"
|
#include "volPointInterpolation.H"
|
||||||
|
#include "ensightBinaryStream.H"
|
||||||
|
#include "ensightAsciiStream.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void writeData(const scalarField& sf, OFstream& ensightFile)
|
|
||||||
{
|
|
||||||
forAll(sf, i)
|
|
||||||
{
|
|
||||||
if (mag( sf[i] ) >= scalar(floatScalarVSMALL))
|
|
||||||
{
|
|
||||||
ensightFile << setw(12) << sf[i] << nl;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ensightFile << setw(12) << scalar(0) << nl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
scalarField map
|
scalarField map
|
||||||
(
|
(
|
||||||
@ -104,64 +90,25 @@ void writeAllData
|
|||||||
const Field<Type>& vf,
|
const Field<Type>& vf,
|
||||||
const labelList& prims,
|
const labelList& prims,
|
||||||
const label nPrims,
|
const label nPrims,
|
||||||
OFstream& ensightFile
|
ensightStream& ensightFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (nPrims)
|
if (nPrims)
|
||||||
{
|
{
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile << key << nl;
|
ensightFile.write(key);
|
||||||
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
||||||
{
|
{
|
||||||
writeData(map(vf, prims, cmpt), ensightFile);
|
scalarField masterData(map(vf, prims, cmpt));
|
||||||
|
ensightFile.write(masterData);
|
||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::scheduled, slave);
|
||||||
scalarField data(fromSlave);
|
scalarField slaveData(fromSlave);
|
||||||
writeData(data, ensightFile);
|
ensightFile.write(slaveData);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
|
||||||
{
|
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
|
||||||
toMaster<< map(vf, prims, cmpt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void writeAllDataBinary
|
|
||||||
(
|
|
||||||
const char* key,
|
|
||||||
const Field<Type>& vf,
|
|
||||||
const labelList& prims,
|
|
||||||
const label nPrims,
|
|
||||||
std::ofstream& ensightFile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (nPrims)
|
|
||||||
{
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
writeEnsDataBinary(key,ensightFile);
|
|
||||||
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
|
||||||
{
|
|
||||||
writeEnsDataBinary(map(vf, prims, cmpt), ensightFile);
|
|
||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
|
||||||
{
|
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
|
||||||
scalarField data(fromSlave);
|
|
||||||
writeEnsDataBinary(data, ensightFile);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,66 +131,25 @@ void writeAllFaceData
|
|||||||
const labelList& prims,
|
const labelList& prims,
|
||||||
const label nPrims,
|
const label nPrims,
|
||||||
const Field<Type>& pf,
|
const Field<Type>& pf,
|
||||||
OFstream& ensightFile
|
ensightStream& ensightFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (nPrims)
|
if (nPrims)
|
||||||
{
|
{
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile << key << nl;
|
ensightFile.write(key);
|
||||||
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
||||||
{
|
{
|
||||||
writeData(map(pf, prims, cmpt), ensightFile);
|
ensightFile.write(map(pf, prims, cmpt));
|
||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::scheduled, slave);
|
||||||
scalarField pf(fromSlave);
|
scalarField pf(fromSlave);
|
||||||
|
|
||||||
writeData(pf, ensightFile);
|
ensightFile.write(pf);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
|
||||||
{
|
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
|
||||||
toMaster<< map(pf, prims, cmpt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void writeAllFaceDataBinary
|
|
||||||
(
|
|
||||||
const char* key,
|
|
||||||
const labelList& prims,
|
|
||||||
const label nPrims,
|
|
||||||
const Field<Type>& pf,
|
|
||||||
std::ofstream& ensightFile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (nPrims)
|
|
||||||
{
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
writeEnsDataBinary(key,ensightFile);
|
|
||||||
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
|
||||||
{
|
|
||||||
writeEnsDataBinary(map(pf, prims, cmpt), ensightFile);
|
|
||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
|
||||||
{
|
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
|
||||||
scalarField pf(fromSlave);
|
|
||||||
|
|
||||||
writeEnsDataBinary(pf, ensightFile);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,16 +173,14 @@ bool writePatchField
|
|||||||
const Foam::label ensightPatchI,
|
const Foam::label ensightPatchI,
|
||||||
const Foam::faceSets& boundaryFaceSet,
|
const Foam::faceSets& boundaryFaceSet,
|
||||||
const Foam::ensightMesh::nFacePrimitives& nfp,
|
const Foam::ensightMesh::nFacePrimitives& nfp,
|
||||||
Foam::OFstream& ensightFile
|
ensightStream& ensightFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (nfp.nTris || nfp.nQuads || nfp.nPolys)
|
if (nfp.nTris || nfp.nQuads || nfp.nPolys)
|
||||||
{
|
{
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile
|
ensightFile.writePartHeader(ensightPatchI);
|
||||||
<< "part" << nl
|
|
||||||
<< setw(10) << ensightPatchI << nl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
writeAllFaceData
|
writeAllFaceData
|
||||||
@ -315,61 +219,6 @@ bool writePatchField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
bool writePatchFieldBinary
|
|
||||||
(
|
|
||||||
const Foam::Field<Type>& pf,
|
|
||||||
const Foam::label patchi,
|
|
||||||
const Foam::label ensightPatchI,
|
|
||||||
const Foam::faceSets& boundaryFaceSet,
|
|
||||||
const Foam::ensightMesh::nFacePrimitives& nfp,
|
|
||||||
std::ofstream& ensightFile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (nfp.nTris || nfp.nQuads || nfp.nPolys)
|
|
||||||
{
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
writeEnsDataBinary("part",ensightFile);
|
|
||||||
writeEnsDataBinary(ensightPatchI,ensightFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
writeAllFaceDataBinary
|
|
||||||
(
|
|
||||||
"tria3",
|
|
||||||
boundaryFaceSet.tris,
|
|
||||||
nfp.nTris,
|
|
||||||
pf,
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
writeAllFaceDataBinary
|
|
||||||
(
|
|
||||||
"quad4",
|
|
||||||
boundaryFaceSet.quads,
|
|
||||||
nfp.nQuads,
|
|
||||||
pf,
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
writeAllFaceDataBinary
|
|
||||||
(
|
|
||||||
"nsided",
|
|
||||||
boundaryFaceSet.polys,
|
|
||||||
nfp.nPolys,
|
|
||||||
pf,
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void writePatchField
|
void writePatchField
|
||||||
(
|
(
|
||||||
@ -380,6 +229,7 @@ void writePatchField
|
|||||||
const Foam::fileName& postProcPath,
|
const Foam::fileName& postProcPath,
|
||||||
const Foam::word& prepend,
|
const Foam::word& prepend,
|
||||||
const Foam::label timeIndex,
|
const Foam::label timeIndex,
|
||||||
|
const bool binary,
|
||||||
Foam::Ostream& ensightCaseFile
|
Foam::Ostream& ensightCaseFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -409,7 +259,7 @@ void writePatchField
|
|||||||
|
|
||||||
word timeFile = prepend + itoa(timeIndex);
|
word timeFile = prepend + itoa(timeIndex);
|
||||||
|
|
||||||
OFstream *ensightFilePtr = NULL;
|
ensightStream* ensightFilePtr = NULL;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (timeIndex == 0)
|
if (timeIndex == 0)
|
||||||
@ -426,20 +276,30 @@ void writePatchField
|
|||||||
|
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
fileName ensightFileName(timeFile + "." + pfName);
|
fileName ensightFileName(timeFile + "." + pfName);
|
||||||
ensightFilePtr = new OFstream
|
|
||||||
(
|
if (binary)
|
||||||
postProcPath/ensightFileName,
|
{
|
||||||
runTime.writeFormat(),
|
ensightFilePtr = new ensightBinaryStream
|
||||||
runTime.writeVersion(),
|
(
|
||||||
runTime.writeCompression()
|
postProcPath/ensightFileName,
|
||||||
);
|
runTime
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ensightFilePtr = new ensightAsciiStream
|
||||||
|
(
|
||||||
|
postProcPath/ensightFileName,
|
||||||
|
runTime
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OFstream& ensightFile = *ensightFilePtr;
|
ensightStream& ensightFile = *ensightFilePtr;
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile << pTraits<Type>::typeName << nl;
|
ensightFile.write(pTraits<Type>::typeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (patchi >= 0)
|
if (patchi >= 0)
|
||||||
@ -477,17 +337,18 @@ void writePatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void ensightFieldAscii
|
void ensightField
|
||||||
(
|
(
|
||||||
const Foam::IOobject& fieldObject,
|
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||||
const Foam::ensightMesh& eMesh,
|
const Foam::ensightMesh& eMesh,
|
||||||
const Foam::fileName& postProcPath,
|
const Foam::fileName& postProcPath,
|
||||||
const Foam::word& prepend,
|
const Foam::word& prepend,
|
||||||
const Foam::label timeIndex,
|
const Foam::label timeIndex,
|
||||||
|
const bool binary,
|
||||||
Foam::Ostream& ensightCaseFile
|
Foam::Ostream& ensightCaseFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info<< "Converting field " << fieldObject.name() << endl;
|
Info<< "Converting field " << vf.name() << endl;
|
||||||
|
|
||||||
word timeFile = prepend + itoa(timeIndex);
|
word timeFile = prepend + itoa(timeIndex);
|
||||||
|
|
||||||
@ -512,23 +373,31 @@ void ensightFieldAscii
|
|||||||
const labelList& hexes = meshCellSets.hexes;
|
const labelList& hexes = meshCellSets.hexes;
|
||||||
const labelList& polys = meshCellSets.polys;
|
const labelList& polys = meshCellSets.polys;
|
||||||
|
|
||||||
OFstream *ensightFilePtr = NULL;
|
ensightStream* ensightFilePtr = NULL;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
fileName ensightFileName(timeFile + "." + fieldObject.name());
|
fileName ensightFileName(timeFile + "." + vf.name());
|
||||||
ensightFilePtr = new OFstream
|
|
||||||
(
|
if (binary)
|
||||||
postProcPath/ensightFileName,
|
{
|
||||||
runTime.writeFormat(),
|
ensightFilePtr = new ensightBinaryStream
|
||||||
runTime.writeVersion(),
|
(
|
||||||
IOstream::UNCOMPRESSED
|
postProcPath/ensightFileName,
|
||||||
);
|
runTime
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ensightFilePtr = new ensightAsciiStream
|
||||||
|
(
|
||||||
|
postProcPath/ensightFileName,
|
||||||
|
runTime
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OFstream& ensightFile = *ensightFilePtr;
|
ensightStream& ensightFile = *ensightFilePtr;
|
||||||
|
|
||||||
GeometricField<Type, fvPatchField, volMesh> vf(fieldObject, mesh);
|
|
||||||
|
|
||||||
if (patchNames.empty())
|
if (patchNames.empty())
|
||||||
{
|
{
|
||||||
@ -548,34 +417,26 @@ void ensightFieldAscii
|
|||||||
<< nl;
|
<< nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ensightFile
|
ensightFile.write(pTraits<Type>::typeName);
|
||||||
<< pTraits<Type>::typeName << nl
|
ensightFile.writePartHeader(1);
|
||||||
<< "part" << nl
|
|
||||||
<< setw(10) << 1 << nl;
|
|
||||||
|
|
||||||
ensightFile.setf(ios_base::scientific, ios_base::floatfield);
|
|
||||||
ensightFile.precision(5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meshCellSets.nHexesWedges)
|
if (meshCellSets.nHexesWedges)
|
||||||
{
|
{
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile << "hexa8" << nl;
|
ensightFile.write("hexa8");
|
||||||
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
||||||
{
|
{
|
||||||
writeData
|
scalarField masterData(map(vf, hexes, wedges, cmpt));
|
||||||
(
|
ensightFile.write(masterData);
|
||||||
map(vf, hexes, wedges, cmpt),
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::scheduled, slave);
|
||||||
scalarField data(fromSlave);
|
scalarField data(fromSlave);
|
||||||
writeData(data, ensightFile);
|
ensightFile.write(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -727,7 +588,6 @@ void ensightFieldAscii
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
delete ensightFilePtr;
|
delete ensightFilePtr;
|
||||||
@ -736,59 +596,48 @@ void ensightFieldAscii
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void ensightFieldBinary
|
void ensightPointField
|
||||||
(
|
(
|
||||||
const Foam::IOobject& fieldObject,
|
const GeometricField<Type, pointPatchField, pointMesh>& pf,
|
||||||
const Foam::ensightMesh& eMesh,
|
const Foam::ensightMesh& eMesh,
|
||||||
const Foam::fileName& postProcPath,
|
const Foam::fileName& postProcPath,
|
||||||
const Foam::word& prepend,
|
const Foam::word& prepend,
|
||||||
const Foam::label timeIndex,
|
const Foam::label timeIndex,
|
||||||
|
const bool binary,
|
||||||
Foam::Ostream& ensightCaseFile
|
Foam::Ostream& ensightCaseFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info<< "Converting field (binary) " << fieldObject.name() << endl;
|
Info<< "Converting field " << pf.name() << endl;
|
||||||
|
|
||||||
word timeFile = prepend + itoa(timeIndex);
|
word timeFile = prepend + itoa(timeIndex);
|
||||||
|
|
||||||
const fvMesh& mesh = eMesh.mesh();
|
ensightStream* ensightFilePtr = NULL;
|
||||||
//const Time& runTime = mesh.time();
|
|
||||||
|
|
||||||
const cellSets& meshCellSets = eMesh.meshCellSets();
|
|
||||||
const List<faceSets>& boundaryFaceSets = eMesh.boundaryFaceSets();
|
|
||||||
const wordList& allPatchNames = eMesh.allPatchNames();
|
|
||||||
const wordHashSet& patchNames = eMesh.patchNames();
|
|
||||||
const HashTable<ensightMesh::nFacePrimitives>&
|
|
||||||
nPatchPrims = eMesh.nPatchPrims();
|
|
||||||
const List<faceSets>& faceZoneFaceSets = eMesh.faceZoneFaceSets();
|
|
||||||
const wordHashSet& faceZoneNames = eMesh.faceZoneNames();
|
|
||||||
const HashTable<ensightMesh::nFacePrimitives>&
|
|
||||||
nFaceZonePrims = eMesh.nFaceZonePrims();
|
|
||||||
|
|
||||||
const labelList& tets = meshCellSets.tets;
|
|
||||||
const labelList& pyrs = meshCellSets.pyrs;
|
|
||||||
const labelList& prisms = meshCellSets.prisms;
|
|
||||||
const labelList& wedges = meshCellSets.wedges;
|
|
||||||
const labelList& hexes = meshCellSets.hexes;
|
|
||||||
const labelList& polys = meshCellSets.polys;
|
|
||||||
|
|
||||||
std::ofstream *ensightFilePtr = NULL;
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
// set the filename of the ensight file
|
// set the filename of the ensight file
|
||||||
fileName ensightFileName(timeFile + "." + fieldObject.name());
|
fileName ensightFileName(timeFile + "." + pf.name());
|
||||||
ensightFilePtr = new std::ofstream
|
|
||||||
(
|
if (binary)
|
||||||
(postProcPath/ensightFileName).c_str(),
|
{
|
||||||
ios_base::out | ios_base::binary | ios_base::trunc
|
ensightFilePtr = new ensightBinaryStream
|
||||||
);
|
(
|
||||||
// Check on file opened?
|
postProcPath/ensightFileName,
|
||||||
|
eMesh.mesh().time()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ensightFilePtr = new ensightAsciiStream
|
||||||
|
(
|
||||||
|
postProcPath/ensightFileName,
|
||||||
|
eMesh.mesh().time()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ofstream& ensightFile = *ensightFilePtr;
|
ensightStream& ensightFile = *ensightFilePtr;
|
||||||
|
|
||||||
GeometricField<Type, fvPatchField, volMesh> vf(fieldObject, mesh);
|
if (eMesh.patchNames().empty())
|
||||||
|
|
||||||
if (patchNames.empty())
|
|
||||||
{
|
{
|
||||||
eMesh.barrier();
|
eMesh.barrier();
|
||||||
|
|
||||||
@ -800,192 +649,49 @@ void ensightFieldBinary
|
|||||||
|
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
<< pTraits<Type>::typeName
|
<< pTraits<Type>::typeName
|
||||||
<< " per element: 1 "
|
<< " per node: 1 "
|
||||||
<< setw(15) << vf.name()
|
<< setw(15) << pf.name()
|
||||||
<< (' ' + prepend + "***." + vf.name()).c_str()
|
<< (' ' + prepend + "***." + pf.name()).c_str()
|
||||||
<< nl;
|
<< nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
writeEnsDataBinary(pTraits<Type>::typeName,ensightFile);
|
ensightFile.write(pTraits<Type>::typeName);
|
||||||
writeEnsDataBinary("part",ensightFile);
|
ensightFile.write("part");
|
||||||
writeEnsDataBinary(1,ensightFile);
|
ensightFile.write(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meshCellSets.nHexesWedges)
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
if (Pstream::master())
|
ensightFile.write("coordinates");
|
||||||
{
|
|
||||||
writeEnsDataBinary("hexa8",ensightFile);
|
|
||||||
|
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
Field<Type> uniqueFld(pf.internalField(), eMesh.uniquePointMap());
|
||||||
{
|
|
||||||
writeEnsDataBinary
|
|
||||||
(
|
|
||||||
map(vf, hexes, wedges, cmpt),
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
||||||
{
|
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
|
||||||
scalarField data(fromSlave);
|
|
||||||
writeEnsDataBinary(data, ensightFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
ensightFile.write(uniqueFld.component(cmpt));
|
||||||
|
|
||||||
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
IPstream fromSlave(Pstream::scheduled, slave);
|
||||||
toMaster<< map(vf, hexes, wedges, cmpt);
|
scalarField data(fromSlave);
|
||||||
|
ensightFile.write(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
writeAllDataBinary
|
|
||||||
(
|
|
||||||
"penta6",
|
|
||||||
vf,
|
|
||||||
prisms,
|
|
||||||
meshCellSets.nPrisms,
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
writeAllDataBinary
|
|
||||||
(
|
|
||||||
"pyramid5",
|
|
||||||
vf,
|
|
||||||
pyrs,
|
|
||||||
meshCellSets.nPyrs,
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
writeAllDataBinary
|
|
||||||
(
|
|
||||||
"tetra4",
|
|
||||||
vf,
|
|
||||||
tets,
|
|
||||||
meshCellSets.nTets,
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
writeAllDataBinary
|
|
||||||
(
|
|
||||||
"nfaced",
|
|
||||||
vf,
|
|
||||||
polys,
|
|
||||||
meshCellSets.nPolys,
|
|
||||||
ensightFile
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
label ensightPatchI = eMesh.patchPartOffset();
|
|
||||||
|
|
||||||
forAll(allPatchNames, patchi)
|
|
||||||
{
|
|
||||||
const word& patchName = allPatchNames[patchi];
|
|
||||||
|
|
||||||
eMesh.barrier();
|
|
||||||
|
|
||||||
if (patchNames.empty() || patchNames.found(patchName))
|
|
||||||
{
|
{
|
||||||
if
|
Field<Type> uniqueFld(pf.internalField(), eMesh.uniquePointMap());
|
||||||
(
|
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
||||||
writePatchFieldBinary
|
|
||||||
(
|
|
||||||
vf.boundaryField()[patchi],
|
|
||||||
patchi,
|
|
||||||
ensightPatchI,
|
|
||||||
boundaryFaceSets[patchi],
|
|
||||||
nPatchPrims.find(patchName)(),
|
|
||||||
ensightFile
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
ensightPatchI++;
|
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
||||||
}
|
toMaster<< uniqueFld.component(cmpt);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// write faceZones, if requested
|
|
||||||
if (faceZoneNames.size())
|
|
||||||
{
|
|
||||||
// Interpolates cell values to faces - needed only when exporting
|
|
||||||
// faceZones...
|
|
||||||
GeometricField<Type, fvsPatchField, surfaceMesh> sf
|
|
||||||
(
|
|
||||||
linearInterpolate(vf)
|
|
||||||
);
|
|
||||||
|
|
||||||
forAllConstIter(wordHashSet, faceZoneNames, iter)
|
|
||||||
{
|
|
||||||
const word& faceZoneName = iter.key();
|
|
||||||
|
|
||||||
eMesh.barrier();
|
|
||||||
|
|
||||||
label zoneID = mesh.faceZones().findZoneID(faceZoneName);
|
|
||||||
|
|
||||||
const faceZone& fz = mesh.faceZones()[zoneID];
|
|
||||||
|
|
||||||
// Prepare data to write
|
|
||||||
label nIncluded = 0;
|
|
||||||
forAll(fz, i)
|
|
||||||
{
|
|
||||||
if (eMesh.faceToBeIncluded(fz[i]))
|
|
||||||
{
|
|
||||||
++nIncluded;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Field<Type> values(nIncluded);
|
|
||||||
|
|
||||||
// Loop on the faceZone and store the needed field values
|
|
||||||
label j = 0;
|
|
||||||
forAll(fz, i)
|
|
||||||
{
|
|
||||||
label faceI = fz[i];
|
|
||||||
if (mesh.isInternalFace(faceI))
|
|
||||||
{
|
|
||||||
values[j] = sf[faceI];
|
|
||||||
++j;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (eMesh.faceToBeIncluded(faceI))
|
|
||||||
{
|
|
||||||
label patchI = mesh.boundaryMesh().whichPatch(faceI);
|
|
||||||
const polyPatch& pp = mesh.boundaryMesh()[patchI];
|
|
||||||
label patchFaceI = pp.whichFace(faceI);
|
|
||||||
Type value = sf.boundaryField()[patchI][patchFaceI];
|
|
||||||
values[j] = value;
|
|
||||||
++j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if
|
|
||||||
(
|
|
||||||
writePatchFieldBinary
|
|
||||||
(
|
|
||||||
values,
|
|
||||||
zoneID,
|
|
||||||
ensightPatchI,
|
|
||||||
faceZoneFaceSets[zoneID],
|
|
||||||
nFaceZonePrims.find(faceZoneName)(),
|
|
||||||
ensightFile
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ensightPatchI++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
ensightFile.close();
|
delete ensightFilePtr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -999,30 +705,42 @@ void ensightField
|
|||||||
const Foam::word& prepend,
|
const Foam::word& prepend,
|
||||||
const Foam::label timeIndex,
|
const Foam::label timeIndex,
|
||||||
const bool binary,
|
const bool binary,
|
||||||
|
const bool nodeValues,
|
||||||
Foam::Ostream& ensightCaseFile
|
Foam::Ostream& ensightCaseFile
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (binary)
|
// Read field
|
||||||
|
GeometricField<Type, fvPatchField, volMesh> vf(fieldObject, eMesh.mesh());
|
||||||
|
|
||||||
|
if (nodeValues)
|
||||||
{
|
{
|
||||||
ensightFieldBinary<Type>
|
tmp<GeometricField<Type, pointPatchField, pointMesh> > pfld
|
||||||
(
|
(
|
||||||
fieldObject,
|
volPointInterpolation::New(eMesh.mesh()).interpolate(vf)
|
||||||
|
);
|
||||||
|
pfld().rename(vf.name());
|
||||||
|
|
||||||
|
ensightPointField<Type>
|
||||||
|
(
|
||||||
|
pfld,
|
||||||
eMesh,
|
eMesh,
|
||||||
postProcPath,
|
postProcPath,
|
||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
|
binary,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ensightFieldAscii<Type>
|
ensightField<Type>
|
||||||
(
|
(
|
||||||
fieldObject,
|
vf,
|
||||||
eMesh,
|
eMesh,
|
||||||
postProcPath,
|
postProcPath,
|
||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
|
binary,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -38,10 +38,13 @@ SourceFiles
|
|||||||
#include "faceSets.H"
|
#include "faceSets.H"
|
||||||
#include "HashTable.H"
|
#include "HashTable.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
#include "fvMesh.H"
|
|
||||||
#include "OFstream.H"
|
|
||||||
#include <fstream>
|
|
||||||
#include "PackedBoolList.H"
|
#include "PackedBoolList.H"
|
||||||
|
#include "wordReList.H"
|
||||||
|
#include "scalarField.H"
|
||||||
|
#include "cellShapeList.H"
|
||||||
|
#include "cellList.H"
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -51,6 +54,7 @@ namespace Foam
|
|||||||
class fvMesh;
|
class fvMesh;
|
||||||
class argList;
|
class argList;
|
||||||
class globalIndex;
|
class globalIndex;
|
||||||
|
class ensightStream;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class ensightMesh Declaration
|
Class ensightMesh Declaration
|
||||||
@ -82,8 +86,19 @@ private:
|
|||||||
//- Reference to the OpenFOAM mesh
|
//- Reference to the OpenFOAM mesh
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
//- Suppress patches
|
||||||
|
const bool noPatches_;
|
||||||
|
|
||||||
|
//- Output selected patches only
|
||||||
|
const bool patches_;
|
||||||
|
const wordReList patchPatterns_;
|
||||||
|
|
||||||
|
//- Output selected faceZones
|
||||||
|
const bool faceZones_;
|
||||||
|
const wordReList faceZonePatterns_;
|
||||||
|
|
||||||
//- Set binary file output
|
//- Set binary file output
|
||||||
bool binary_;
|
const bool binary_;
|
||||||
|
|
||||||
//- The ensight part id for the first patch
|
//- The ensight part id for the first patch
|
||||||
label patchPartOffset_;
|
label patchPartOffset_;
|
||||||
@ -109,6 +124,19 @@ private:
|
|||||||
PackedBoolList boundaryFaceToBeIncluded_;
|
PackedBoolList boundaryFaceToBeIncluded_;
|
||||||
|
|
||||||
|
|
||||||
|
// Parallel merged points
|
||||||
|
|
||||||
|
//- Global numbering for merged points
|
||||||
|
autoPtr<globalIndex> globalPointsPtr_;
|
||||||
|
|
||||||
|
//- From mesh point to global merged point
|
||||||
|
labelList pointToGlobal_;
|
||||||
|
|
||||||
|
//- Local points that are unique
|
||||||
|
labelList uniquePointMap_;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
@ -120,7 +148,7 @@ private:
|
|||||||
void writePoints
|
void writePoints
|
||||||
(
|
(
|
||||||
const scalarField& pointsComponent,
|
const scalarField& pointsComponent,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
cellShapeList map
|
cellShapeList map
|
||||||
@ -141,14 +169,14 @@ private:
|
|||||||
void writePrims
|
void writePrims
|
||||||
(
|
(
|
||||||
const cellShapeList& cellShapes,
|
const cellShapeList& cellShapes,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writePolysNFaces
|
void writePolysNFaces
|
||||||
(
|
(
|
||||||
const labelList& polys,
|
const labelList& polys,
|
||||||
const cellList& cellFaces,
|
const cellList& cellFaces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writePolysNPointsPerFace
|
void writePolysNPointsPerFace
|
||||||
@ -156,7 +184,7 @@ private:
|
|||||||
const labelList& polys,
|
const labelList& polys,
|
||||||
const cellList& cellFaces,
|
const cellList& cellFaces,
|
||||||
const faceList& faces,
|
const faceList& faces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writePolysPoints
|
void writePolysPoints
|
||||||
@ -164,13 +192,13 @@ private:
|
|||||||
const labelList& polys,
|
const labelList& polys,
|
||||||
const cellList& cellFaces,
|
const cellList& cellFaces,
|
||||||
const faceList& faces,
|
const faceList& faces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeAllPolys
|
void writeAllPolys
|
||||||
(
|
(
|
||||||
const labelList& pointToGlobal,
|
const labelList& pointToGlobal,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeAllPrims
|
void writeAllPrims
|
||||||
@ -178,13 +206,13 @@ private:
|
|||||||
const char* key,
|
const char* key,
|
||||||
const label nPrims,
|
const label nPrims,
|
||||||
const cellShapeList& cellShapes,
|
const cellShapeList& cellShapes,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeFacePrims
|
void writeFacePrims
|
||||||
(
|
(
|
||||||
const faceList& patchFaces,
|
const faceList& patchFaces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeAllFacePrims
|
void writeAllFacePrims
|
||||||
@ -193,19 +221,19 @@ private:
|
|||||||
const labelList& prims,
|
const labelList& prims,
|
||||||
const label nPrims,
|
const label nPrims,
|
||||||
const faceList& patchFaces,
|
const faceList& patchFaces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeNSidedNPointsPerFace
|
void writeNSidedNPointsPerFace
|
||||||
(
|
(
|
||||||
const faceList& patchFaces,
|
const faceList& patchFaces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeNSidedPoints
|
void writeNSidedPoints
|
||||||
(
|
(
|
||||||
const faceList& patchFaces,
|
const faceList& patchFaces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeAllNSided
|
void writeAllNSided
|
||||||
@ -213,14 +241,14 @@ private:
|
|||||||
const labelList& prims,
|
const labelList& prims,
|
||||||
const label nPrims,
|
const label nPrims,
|
||||||
const faceList& patchFaces,
|
const faceList& patchFaces,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeAllInternalPoints
|
void writeAllInternalPoints
|
||||||
(
|
(
|
||||||
const pointField& uniquePoints,
|
const pointField& uniquePoints,
|
||||||
const label nPoints,
|
const label nPoints,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
void writeAllPatchPoints
|
void writeAllPatchPoints
|
||||||
@ -229,123 +257,7 @@ private:
|
|||||||
const word& patchName,
|
const word& patchName,
|
||||||
const pointField& uniquePoints,
|
const pointField& uniquePoints,
|
||||||
const label nPoints,
|
const label nPoints,
|
||||||
OFstream& ensightGeometryFile
|
ensightStream& ensightGeometryFile
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAllInternalPointsBinary
|
|
||||||
(
|
|
||||||
const pointField& uniquePoints,
|
|
||||||
const label nPoints,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAllPatchPointsBinary
|
|
||||||
(
|
|
||||||
label ensightPatchI,
|
|
||||||
const word& patchName,
|
|
||||||
const pointField& uniquePoints,
|
|
||||||
const label nPoints,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAscii
|
|
||||||
(
|
|
||||||
const fileName& postProcPath,
|
|
||||||
const word& prepend,
|
|
||||||
const label timeIndex,
|
|
||||||
Ostream& ensightCaseFile,
|
|
||||||
const labelList& pointToGlobal,
|
|
||||||
const pointField& uniquePoints,
|
|
||||||
const globalIndex& globalPoints
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeBinary
|
|
||||||
(
|
|
||||||
const fileName& postProcPath,
|
|
||||||
const word& prepend,
|
|
||||||
const label timeIndex,
|
|
||||||
Ostream& ensightCaseFile,
|
|
||||||
const labelList& pointToGlobal,
|
|
||||||
const pointField& uniquePoints,
|
|
||||||
const globalIndex& globalPoints
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writePrimsBinary
|
|
||||||
(
|
|
||||||
const cellShapeList& cellShapes,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAllPrimsBinary
|
|
||||||
(
|
|
||||||
const char* key,
|
|
||||||
const label nPrims,
|
|
||||||
const cellShapeList& cellShapes,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writePolysNFacesBinary
|
|
||||||
(
|
|
||||||
const labelList& polys,
|
|
||||||
const cellList& cellFaces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writePolysNPointsPerFaceBinary
|
|
||||||
(
|
|
||||||
const labelList& polys,
|
|
||||||
const cellList& cellFaces,
|
|
||||||
const faceList& faces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writePolysPointsBinary
|
|
||||||
(
|
|
||||||
const labelList& polys,
|
|
||||||
const cellList& cellFaces,
|
|
||||||
const faceList& faces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAllPolysBinary
|
|
||||||
(
|
|
||||||
const labelList& pointToGlobal,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAllFacePrimsBinary
|
|
||||||
(
|
|
||||||
const char* key,
|
|
||||||
const labelList& prims,
|
|
||||||
const label nPrims,
|
|
||||||
const faceList& patchFaces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeFacePrimsBinary
|
|
||||||
(
|
|
||||||
const faceList& patchFaces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeNSidedPointsBinary
|
|
||||||
(
|
|
||||||
const faceList& patchFaces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeNSidedNPointsPerFaceBinary
|
|
||||||
(
|
|
||||||
const faceList& patchFaces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
|
||||||
|
|
||||||
void writeAllNSidedBinary
|
|
||||||
(
|
|
||||||
const labelList& prims,
|
|
||||||
const label nPrims,
|
|
||||||
const faceList& patchFaces,
|
|
||||||
std::ofstream& ensightGeometryFile
|
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -355,8 +267,12 @@ public:
|
|||||||
//- Construct from fvMesh
|
//- Construct from fvMesh
|
||||||
ensightMesh
|
ensightMesh
|
||||||
(
|
(
|
||||||
const fvMesh&,
|
const fvMesh& mesh,
|
||||||
const argList& args,
|
const bool noPatches,
|
||||||
|
const bool patches,
|
||||||
|
const wordReList& patchPatterns,
|
||||||
|
const bool faceZones,
|
||||||
|
const wordReList& faceZonePatterns,
|
||||||
const bool binary
|
const bool binary
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -420,8 +336,35 @@ public:
|
|||||||
return patchPartOffset_;
|
return patchPartOffset_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Parallel point merging
|
||||||
|
|
||||||
|
//- Global numbering for merged points
|
||||||
|
const globalIndex& globalPoints() const
|
||||||
|
{
|
||||||
|
return globalPointsPtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
//- From mesh point to global merged point
|
||||||
|
const labelList& pointToGlobal() const
|
||||||
|
{
|
||||||
|
return pointToGlobal_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Local points that are unique
|
||||||
|
const labelList& uniquePointMap() const
|
||||||
|
{
|
||||||
|
return uniquePointMap_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
|
|
||||||
|
//- Update for new mesh
|
||||||
|
void correct();
|
||||||
|
|
||||||
//- When exporting faceZones, check if a given face has to be included
|
//- When exporting faceZones, check if a given face has to be included
|
||||||
// or not (i.e. faces on processor boundaries)
|
// or not (i.e. faces on processor boundaries)
|
||||||
bool faceToBeIncluded(const label faceI) const;
|
bool faceToBeIncluded(const label faceI) const;
|
||||||
|
|||||||
@ -0,0 +1,112 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::ensightStream
|
||||||
|
|
||||||
|
Description
|
||||||
|
Abstract base class for writing Ensight data
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
ensightStream.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef ensightStream_H
|
||||||
|
#define ensightStream_H
|
||||||
|
|
||||||
|
#include "fileName.H"
|
||||||
|
#include "scalarField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class ensightStream Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class ensightStream
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
const fileName name_;
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
ensightStream(const ensightStream&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const ensightStream&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
ensightStream(const fileName& f)
|
||||||
|
:
|
||||||
|
name_(f)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~ensightStream()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
const fileName& name() const
|
||||||
|
{
|
||||||
|
return name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void write(const char*) = 0;
|
||||||
|
|
||||||
|
virtual void write(const int) = 0;
|
||||||
|
|
||||||
|
virtual void write(const scalarField&) = 0;
|
||||||
|
|
||||||
|
virtual void write(const List<int>&) = 0;
|
||||||
|
|
||||||
|
virtual void writePartHeader(const label) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -1,78 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "ensightWriteBinary.H"
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void writeEnsDataBinary
|
|
||||||
(
|
|
||||||
const char* val,
|
|
||||||
std::ofstream& ensFile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char buffer[80] = {0};
|
|
||||||
strcpy(buffer, val);
|
|
||||||
ensFile.write(buffer, 80*sizeof(char));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void writeEnsDataBinary
|
|
||||||
(
|
|
||||||
const int val,
|
|
||||||
std::ofstream& ensFile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ensFile.write(reinterpret_cast<const char*>(&val), sizeof(int));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void writeEnsDataBinary
|
|
||||||
(
|
|
||||||
const scalarField& sf,
|
|
||||||
std::ofstream& ensightFile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (sf.size())
|
|
||||||
{
|
|
||||||
List<float> temp(sf.size());
|
|
||||||
|
|
||||||
forAll(sf, i)
|
|
||||||
{
|
|
||||||
temp[i] = float(sf[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
ensightFile.write
|
|
||||||
(
|
|
||||||
reinterpret_cast<char*>(temp.begin()),
|
|
||||||
sf.size()*sizeof(float)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
|
|
||||||
@ -1,67 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
InApplication
|
|
||||||
foamToEnsight
|
|
||||||
|
|
||||||
Description
|
|
||||||
Collection of functions for binary write in EnSight files
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
ensightWriteBinary.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef ensightWriteBinary_H
|
|
||||||
#define ensightWriteBinary_H
|
|
||||||
|
|
||||||
#include "ensightMesh.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void writeEnsDataBinary
|
|
||||||
(
|
|
||||||
const char* val,
|
|
||||||
std::ofstream& ensFile
|
|
||||||
);
|
|
||||||
|
|
||||||
void writeEnsDataBinary
|
|
||||||
(
|
|
||||||
const int val,
|
|
||||||
std::ofstream& ensFile
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
void writeEnsDataBinary
|
|
||||||
(
|
|
||||||
const scalarField& sf,
|
|
||||||
std::ofstream& ensightFile
|
|
||||||
);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -44,15 +44,6 @@ namespace Foam
|
|||||||
|
|
||||||
class faceSets
|
class faceSets
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
faceSets(const faceSets&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const faceSets&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
label nTris;
|
label nTris;
|
||||||
|
|||||||
@ -104,6 +104,11 @@ int main(int argc, char *argv[])
|
|||||||
"write in ASCII format instead of 'C Binary'"
|
"write in ASCII format instead of 'C Binary'"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"nodeValues",
|
||||||
|
"write values in nodes"
|
||||||
|
);
|
||||||
|
argList::addBoolOption
|
||||||
(
|
(
|
||||||
"noPatches",
|
"noPatches",
|
||||||
"suppress writing any patches"
|
"suppress writing any patches"
|
||||||
@ -126,6 +131,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Check options
|
// Check options
|
||||||
const bool binary = !args.optionFound("ascii");
|
const bool binary = !args.optionFound("ascii");
|
||||||
|
const bool nodeValues = args.optionFound("nodeValues");
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
@ -191,7 +197,29 @@ int main(int argc, char *argv[])
|
|||||||
OFstream& ensightCaseFile = *ensightCaseFilePtr;
|
OFstream& ensightCaseFile = *ensightCaseFilePtr;
|
||||||
|
|
||||||
// Construct the EnSight mesh
|
// Construct the EnSight mesh
|
||||||
ensightMesh eMesh(mesh, args, binary);
|
const bool selectedPatches = args.optionFound("patches");
|
||||||
|
wordReList patchPatterns;
|
||||||
|
if (selectedPatches)
|
||||||
|
{
|
||||||
|
patchPatterns = wordReList(args.optionLookup("patches")());
|
||||||
|
}
|
||||||
|
const bool selectedZones = args.optionFound("faceZones");
|
||||||
|
wordReList zonePatterns;
|
||||||
|
if (selectedZones)
|
||||||
|
{
|
||||||
|
zonePatterns = wordReList(args.optionLookup("faceZones")());
|
||||||
|
}
|
||||||
|
|
||||||
|
ensightMesh eMesh
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
args.optionFound("noPatches"),
|
||||||
|
selectedPatches,
|
||||||
|
patchPatterns,
|
||||||
|
selectedZones,
|
||||||
|
zonePatterns,
|
||||||
|
binary
|
||||||
|
);
|
||||||
|
|
||||||
// Set Time to the last time before looking for the lagrangian objects
|
// Set Time to the last time before looking for the lagrangian objects
|
||||||
runTime.setTime(Times.last(), Times.size()-1);
|
runTime.setTime(Times.last(), Times.size()-1);
|
||||||
@ -313,6 +341,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
polyMesh::readUpdateState meshState = mesh.readUpdate();
|
polyMesh::readUpdateState meshState = mesh.readUpdate();
|
||||||
|
|
||||||
|
if (meshState != polyMesh::UNCHANGED)
|
||||||
|
{
|
||||||
|
eMesh.correct();
|
||||||
|
}
|
||||||
|
|
||||||
if (timeIndex == 0 || (meshState != polyMesh::UNCHANGED))
|
if (timeIndex == 0 || (meshState != polyMesh::UNCHANGED))
|
||||||
{
|
{
|
||||||
eMesh.write
|
eMesh.write
|
||||||
@ -371,6 +404,7 @@ int main(int argc, char *argv[])
|
|||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
binary,
|
binary,
|
||||||
|
nodeValues,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -384,6 +418,7 @@ int main(int argc, char *argv[])
|
|||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
binary,
|
binary,
|
||||||
|
nodeValues,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -397,6 +432,7 @@ int main(int argc, char *argv[])
|
|||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
binary,
|
binary,
|
||||||
|
nodeValues,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -410,6 +446,7 @@ int main(int argc, char *argv[])
|
|||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
binary,
|
binary,
|
||||||
|
nodeValues,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -423,6 +460,7 @@ int main(int argc, char *argv[])
|
|||||||
prepend,
|
prepend,
|
||||||
timeIndex,
|
timeIndex,
|
||||||
binary,
|
binary,
|
||||||
|
nodeValues,
|
||||||
ensightCaseFile
|
ensightCaseFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,6 +76,11 @@ cleanCase()
|
|||||||
sets/streamLines \
|
sets/streamLines \
|
||||||
> /dev/null 2>&1
|
> /dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -e constant/polyMesh/blockMeshDict.m4 ]
|
||||||
|
then
|
||||||
|
rm -f constant/polyMesh/blockMeshDict > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
for f in `find . -name "*Dict"`
|
for f in `find . -name "*Dict"`
|
||||||
do
|
do
|
||||||
sed -e /arguments/d $f > temp.$$
|
sed -e /arguments/d $f > temp.$$
|
||||||
|
|||||||
@ -20,7 +20,8 @@ The disadvantages:
|
|||||||
- a patch-wise loop now might need to store data to go to the neighbour half
|
- a patch-wise loop now might need to store data to go to the neighbour half
|
||||||
since it is no longer handled in a single patch.
|
since it is no longer handled in a single patch.
|
||||||
- decomposed cyclics now require overlapping communications so will
|
- decomposed cyclics now require overlapping communications so will
|
||||||
only work in non-blocking mode. Hence the underlying message passing library
|
only work in 'nonBlocking' mode or 'blocking' (=buffered) mode but not
|
||||||
|
in 'scheduled' mode. The underlying message passing library
|
||||||
will require overlapping communications with message tags.
|
will require overlapping communications with message tags.
|
||||||
- it is quite a code-change and there might be some oversights.
|
- it is quite a code-change and there might be some oversights.
|
||||||
- once converted (see foamUpgradeCyclics below) cases are not backwards
|
- once converted (see foamUpgradeCyclics below) cases are not backwards
|
||||||
@ -103,19 +104,14 @@ type 'processorCyclic'.
|
|||||||
|
|
||||||
|
|
||||||
- processor patches use overlapping communication using a different message
|
- processor patches use overlapping communication using a different message
|
||||||
tag. This maps straight through into the MPI message tag.
|
tag. This maps straight through into the MPI message tag. Each processor
|
||||||
See processorCyclicPolyPatch::tag(). This needs to be calculated the
|
'interface' (processorPolyPatch, processorFvPatch, etc.) has a 'tag()'
|
||||||
same on both sides so is calculated as
|
to use for communication.
|
||||||
Pstream::nProcs()*max(myProcNo, neighbProcNo)
|
|
||||||
+ min(myProcNo, neighbProcNo)
|
|
||||||
which is
|
|
||||||
- unique
|
|
||||||
- commutative
|
|
||||||
- does not interfere with the default tag (= 1)
|
|
||||||
|
|
||||||
|
|
||||||
- when constructing a GeometricField from a dictionary it will explicitly
|
- when constructing a GeometricField from a dictionary it will explicitly
|
||||||
check for non-existing entries for cyclic patches and exit with an error message
|
check for non-existing entries for cyclic patches and exit with an error message
|
||||||
warning to run foamUpgradeCyclics.
|
warning to run foamUpgradeCyclics. (1.7.x will check if you are trying
|
||||||
|
to run a case which has split cyclics)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -296,6 +296,7 @@ primitiveShapes = meshes/primitiveShapes
|
|||||||
$(primitiveShapes)/line/line.C
|
$(primitiveShapes)/line/line.C
|
||||||
$(primitiveShapes)/plane/plane.C
|
$(primitiveShapes)/plane/plane.C
|
||||||
$(primitiveShapes)/triangle/intersection.C
|
$(primitiveShapes)/triangle/intersection.C
|
||||||
|
$(primitiveShapes)/objectHit/pointIndexHitIOList.C
|
||||||
|
|
||||||
meshShapes = meshes/meshShapes
|
meshShapes = meshes/meshShapes
|
||||||
$(meshShapes)/edge/edge.C
|
$(meshShapes)/edge/edge.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,11 @@ Class
|
|||||||
Foam::IndirectList
|
Foam::IndirectList
|
||||||
|
|
||||||
Description
|
Description
|
||||||
A List with indirect addressing
|
A List with indirect addressing.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::UIndirectList for a version without any allocation for the
|
||||||
|
addressing.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
IndirectListI.H
|
IndirectListI.H
|
||||||
@ -35,24 +39,79 @@ SourceFiles
|
|||||||
#ifndef IndirectList_H
|
#ifndef IndirectList_H
|
||||||
#define IndirectList_H
|
#define IndirectList_H
|
||||||
|
|
||||||
#include "List.H"
|
#include "UIndirectList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class IndirectListAddressing Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
//- A helper class for storing addresses.
|
||||||
|
class IndirectListAddressing
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Storage for the list addressing
|
||||||
|
List<label> addressing_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
IndirectListAddressing(const IndirectListAddressing&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const IndirectListAddressing&);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct by copying the addressing array
|
||||||
|
explicit inline IndirectListAddressing(const UList<label>& addr);
|
||||||
|
|
||||||
|
//- Construct by transferring addressing array
|
||||||
|
explicit inline IndirectListAddressing(const Xfer<List<label> >& addr);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Return the list addressing
|
||||||
|
inline const List<label>& addressing() const;
|
||||||
|
|
||||||
|
// Edit
|
||||||
|
|
||||||
|
//- Reset addressing
|
||||||
|
inline void resetAddressing(const UList<label>&);
|
||||||
|
inline void resetAddressing(const Xfer<List<label> >&);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class IndirectList Declaration
|
Class IndirectList Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
class IndirectList
|
class IndirectList
|
||||||
|
:
|
||||||
|
private IndirectListAddressing,
|
||||||
|
public UIndirectList<T>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Member Functions
|
||||||
|
|
||||||
UList<T>& completeList_;
|
//- Disable default assignment operator
|
||||||
List<label> addressing_;
|
void operator=(const IndirectList<T>&);
|
||||||
|
|
||||||
|
//- Disable assignment from UIndirectList
|
||||||
|
void operator=(const UIndirectList<T>&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -65,59 +124,32 @@ public:
|
|||||||
//- Construct given the complete list and by transferring addressing
|
//- Construct given the complete list and by transferring addressing
|
||||||
inline IndirectList(const UList<T>&, const Xfer<List<label> >&);
|
inline IndirectList(const UList<T>&, const Xfer<List<label> >&);
|
||||||
|
|
||||||
|
//- Copy constructor
|
||||||
|
inline IndirectList(const IndirectList<T>&);
|
||||||
|
|
||||||
|
//- Construct from UIndirectList
|
||||||
|
explicit inline IndirectList(const UIndirectList<T>&);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the number of elements in the list
|
|
||||||
inline label size() const;
|
|
||||||
|
|
||||||
//- Return true if the list is empty (ie, size() is zero).
|
|
||||||
inline bool empty() const;
|
|
||||||
|
|
||||||
//- Return the first element of the list.
|
|
||||||
inline T& first();
|
|
||||||
|
|
||||||
//- Return first element of the list.
|
|
||||||
inline const T& first() const;
|
|
||||||
|
|
||||||
//- Return the last element of the list.
|
|
||||||
inline T& last();
|
|
||||||
|
|
||||||
//- Return the last element of the list.
|
|
||||||
inline const T& last() const;
|
|
||||||
|
|
||||||
//- Return the complete list
|
|
||||||
inline const UList<T>& completeList() const;
|
|
||||||
|
|
||||||
//- Return the list addressing
|
//- Return the list addressing
|
||||||
inline const List<label>& addressing() const;
|
using UIndirectList<T>::addressing;
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Reset addressing
|
//- Reset addressing
|
||||||
inline void resetAddressing(const UList<label>&);
|
using IndirectListAddressing::resetAddressing;
|
||||||
inline void resetAddressing(const Xfer<List<label> >&);
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Return the addressed elements as a List
|
//- Assignment operator
|
||||||
inline List<T> operator()() const;
|
using UIndirectList<T>::operator=;
|
||||||
|
|
||||||
//- Return non-const access to an element
|
|
||||||
inline T& operator[](const label);
|
|
||||||
|
|
||||||
//- Return const access to an element
|
|
||||||
inline const T& operator[](const label) const;
|
|
||||||
|
|
||||||
//- Assignment from UList of addressed elements
|
|
||||||
inline void operator=(const UList<T>&);
|
|
||||||
|
|
||||||
//- Assignment of all entries to the given value
|
|
||||||
inline void operator=(const T&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,6 +25,25 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::IndirectListAddressing::IndirectListAddressing
|
||||||
|
(
|
||||||
|
const UList<label>& addr
|
||||||
|
)
|
||||||
|
:
|
||||||
|
addressing_(addr)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::IndirectListAddressing::IndirectListAddressing
|
||||||
|
(
|
||||||
|
const Xfer<List<label> >& addr
|
||||||
|
)
|
||||||
|
:
|
||||||
|
addressing_(addr)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline Foam::IndirectList<T>::IndirectList
|
inline Foam::IndirectList<T>::IndirectList
|
||||||
(
|
(
|
||||||
@ -32,8 +51,12 @@ inline Foam::IndirectList<T>::IndirectList
|
|||||||
const UList<label>& addr
|
const UList<label>& addr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
completeList_(const_cast<UList<T>&>(completeList)),
|
IndirectListAddressing(addr),
|
||||||
addressing_(addr)
|
UIndirectList<T>
|
||||||
|
(
|
||||||
|
completeList,
|
||||||
|
IndirectListAddressing::addressing()
|
||||||
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -44,71 +67,55 @@ inline Foam::IndirectList<T>::IndirectList
|
|||||||
const Xfer<List<label> >& addr
|
const Xfer<List<label> >& addr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
completeList_(const_cast<UList<T>&>(completeList)),
|
IndirectListAddressing(addr),
|
||||||
addressing_(addr)
|
UIndirectList<T>
|
||||||
|
(
|
||||||
|
completeList,
|
||||||
|
IndirectListAddressing::addressing()
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline Foam::IndirectList<T>::IndirectList
|
||||||
|
(
|
||||||
|
const IndirectList<T>& lst
|
||||||
|
)
|
||||||
|
:
|
||||||
|
IndirectListAddressing(lst.addressing()),
|
||||||
|
UIndirectList<T>
|
||||||
|
(
|
||||||
|
lst.completeList(),
|
||||||
|
IndirectListAddressing::addressing()
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline Foam::IndirectList<T>::IndirectList
|
||||||
|
(
|
||||||
|
const UIndirectList<T>& lst
|
||||||
|
)
|
||||||
|
:
|
||||||
|
IndirectListAddressing(lst.addressing()),
|
||||||
|
UIndirectList<T>
|
||||||
|
(
|
||||||
|
lst.completeList(),
|
||||||
|
IndirectListAddressing::addressing()
|
||||||
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
inline const Foam::List<Foam::label>&
|
||||||
inline Foam::label Foam::IndirectList<T>::size() const
|
Foam::IndirectListAddressing::addressing() const
|
||||||
{
|
|
||||||
return addressing_.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline bool Foam::IndirectList<T>::empty() const
|
|
||||||
{
|
|
||||||
return addressing_.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline T& Foam::IndirectList<T>::first()
|
|
||||||
{
|
|
||||||
return completeList_[addressing_.first()];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline const T& Foam::IndirectList<T>::first() const
|
|
||||||
{
|
|
||||||
return completeList_[addressing_.first()];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline T& Foam::IndirectList<T>::last()
|
|
||||||
{
|
|
||||||
return completeList_[addressing_.last()];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline const T& Foam::IndirectList<T>::last() const
|
|
||||||
{
|
|
||||||
return completeList_[addressing_.last()];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline const Foam::UList<T>& Foam::IndirectList<T>::completeList() const
|
|
||||||
{
|
|
||||||
return completeList_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline const Foam::List<Foam::label>& Foam::IndirectList<T>::addressing() const
|
|
||||||
{
|
{
|
||||||
return addressing_;
|
return addressing_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
inline void Foam::IndirectListAddressing::resetAddressing
|
||||||
inline void Foam::IndirectList<T>::resetAddressing
|
|
||||||
(
|
(
|
||||||
const UList<label>& addr
|
const UList<label>& addr
|
||||||
)
|
)
|
||||||
@ -117,8 +124,7 @@ inline void Foam::IndirectList<T>::resetAddressing
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
inline void Foam::IndirectListAddressing::resetAddressing
|
||||||
inline void Foam::IndirectList<T>::resetAddressing
|
|
||||||
(
|
(
|
||||||
const Xfer<List<label> >& addr
|
const Xfer<List<label> >& addr
|
||||||
)
|
)
|
||||||
@ -127,63 +133,4 @@ inline void Foam::IndirectList<T>::resetAddressing
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline Foam::List<T> Foam::IndirectList<T>::operator()() const
|
|
||||||
{
|
|
||||||
List<T> result(size());
|
|
||||||
|
|
||||||
forAll(*this, i)
|
|
||||||
{
|
|
||||||
result[i] = operator[](i);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline T& Foam::IndirectList<T>::operator[](const label i)
|
|
||||||
{
|
|
||||||
return completeList_[addressing_[i]];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline const T& Foam::IndirectList<T>::operator[](const label i) const
|
|
||||||
{
|
|
||||||
return completeList_[addressing_[i]];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline void Foam::IndirectList<T>::operator=(const UList<T>& ae)
|
|
||||||
{
|
|
||||||
if (addressing_.size() != ae.size())
|
|
||||||
{
|
|
||||||
FatalErrorIn("IndirectList<T>::operator=(const UList<T>&)")
|
|
||||||
<< "Addressing and list of addressed elements "
|
|
||||||
"have different sizes: "
|
|
||||||
<< addressing_.size() << " " << ae.size()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(addressing_, i)
|
|
||||||
{
|
|
||||||
completeList_[addressing_[i]] = ae[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
inline void Foam::IndirectList<T>::operator=(const T& t)
|
|
||||||
{
|
|
||||||
forAll(addressing_, i)
|
|
||||||
{
|
|
||||||
completeList_[addressing_[i]] = t;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -266,24 +266,6 @@ Foam::List<T>::List(const SLList<T>& lst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct as copy of IndirectList<T>
|
|
||||||
template<class T>
|
|
||||||
Foam::List<T>::List(const IndirectList<T>& lst)
|
|
||||||
:
|
|
||||||
UList<T>(NULL, lst.size())
|
|
||||||
{
|
|
||||||
if (this->size_)
|
|
||||||
{
|
|
||||||
this->v_ = new T[this->size_];
|
|
||||||
|
|
||||||
forAll(*this, i)
|
|
||||||
{
|
|
||||||
this->operator[](i) = lst[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Construct as copy of UIndirectList<T>
|
// Construct as copy of UIndirectList<T>
|
||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(const UIndirectList<T>& lst)
|
Foam::List<T>::List(const UIndirectList<T>& lst)
|
||||||
@ -517,25 +499,6 @@ void Foam::List<T>::operator=(const SLList<T>& lst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Assignment operator. Takes linear time.
|
|
||||||
template<class T>
|
|
||||||
void Foam::List<T>::operator=(const IndirectList<T>& lst)
|
|
||||||
{
|
|
||||||
if (lst.size() != this->size_)
|
|
||||||
{
|
|
||||||
if (this->v_) delete[] this->v_;
|
|
||||||
this->v_ = 0;
|
|
||||||
this->size_ = lst.size();
|
|
||||||
if (this->size_) this->v_ = new T[this->size_];
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(*this, i)
|
|
||||||
{
|
|
||||||
this->operator[](i) = lst[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Assignment operator. Takes linear time.
|
// Assignment operator. Takes linear time.
|
||||||
template<class T>
|
template<class T>
|
||||||
void Foam::List<T>::operator=(const UIndirectList<T>& lst)
|
void Foam::List<T>::operator=(const UIndirectList<T>& lst)
|
||||||
|
|||||||
@ -131,9 +131,6 @@ public:
|
|||||||
//- Construct as copy of SLList<T>
|
//- Construct as copy of SLList<T>
|
||||||
explicit List(const SLList<T>&);
|
explicit List(const SLList<T>&);
|
||||||
|
|
||||||
//- Construct as copy of IndirectList<T>
|
|
||||||
explicit List(const IndirectList<T>&);
|
|
||||||
|
|
||||||
//- Construct as copy of UIndirectList<T>
|
//- Construct as copy of UIndirectList<T>
|
||||||
explicit List(const UIndirectList<T>&);
|
explicit List(const UIndirectList<T>&);
|
||||||
|
|
||||||
@ -219,9 +216,6 @@ public:
|
|||||||
//- Assignment from SLList operator. Takes linear time.
|
//- Assignment from SLList operator. Takes linear time.
|
||||||
void operator=(const SLList<T>&);
|
void operator=(const SLList<T>&);
|
||||||
|
|
||||||
//- Assignment from IndirectList operator. Takes linear time.
|
|
||||||
void operator=(const IndirectList<T>&);
|
|
||||||
|
|
||||||
//- Assignment from UIndirectList operator. Takes linear time.
|
//- Assignment from UIndirectList operator. Takes linear time.
|
||||||
void operator=(const UIndirectList<T>&);
|
void operator=(const UIndirectList<T>&);
|
||||||
|
|
||||||
|
|||||||
@ -126,6 +126,14 @@ class face
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Return types for classify
|
||||||
|
enum proxType
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
POINT, // Close to point
|
||||||
|
EDGE // Close to edge
|
||||||
|
};
|
||||||
|
|
||||||
// Static data members
|
// Static data members
|
||||||
|
|
||||||
static const char* const typeName;
|
static const char* const typeName;
|
||||||
@ -249,6 +257,20 @@ public:
|
|||||||
const pointField& meshPoints
|
const pointField& meshPoints
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Return nearest point to face and classify it:
|
||||||
|
// + near point (nearType=POINT, nearLabel=0, 1, 2)
|
||||||
|
// + near edge (nearType=EDGE, nearLabel=0, 1, 2)
|
||||||
|
// Note: edges are counted from starting vertex so
|
||||||
|
// e.g. edge n is from f[n] to f[0], where the face has n + 1
|
||||||
|
// points
|
||||||
|
pointHit nearestPointClassify
|
||||||
|
(
|
||||||
|
const point& p,
|
||||||
|
const pointField& meshPoints,
|
||||||
|
label& nearType,
|
||||||
|
label& nearLabel
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Return contact sphere diameter
|
//- Return contact sphere diameter
|
||||||
scalar contactSphereDiameter
|
scalar contactSphereDiameter
|
||||||
(
|
(
|
||||||
|
|||||||
@ -181,6 +181,22 @@ Foam::pointHit Foam::face::nearestPoint
|
|||||||
const point& p,
|
const point& p,
|
||||||
const pointField& meshPoints
|
const pointField& meshPoints
|
||||||
) const
|
) const
|
||||||
|
{
|
||||||
|
// Dummy labels
|
||||||
|
label nearType = -1;
|
||||||
|
label nearLabel = -1;
|
||||||
|
|
||||||
|
return nearestPointClassify(p, meshPoints, nearType, nearLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::pointHit Foam::face::nearestPointClassify
|
||||||
|
(
|
||||||
|
const point& p,
|
||||||
|
const pointField& meshPoints,
|
||||||
|
label& nearType,
|
||||||
|
label& nearLabel
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
const face& f = *this;
|
const face& f = *this;
|
||||||
point ctr = centre(meshPoints);
|
point ctr = centre(meshPoints);
|
||||||
@ -188,6 +204,9 @@ Foam::pointHit Foam::face::nearestPoint
|
|||||||
// Initialize to miss, distance=GREAT
|
// Initialize to miss, distance=GREAT
|
||||||
pointHit nearest(p);
|
pointHit nearest(p);
|
||||||
|
|
||||||
|
nearType = -1;
|
||||||
|
nearLabel = -1;
|
||||||
|
|
||||||
label nPoints = f.size();
|
label nPoints = f.size();
|
||||||
|
|
||||||
point nextPoint = ctr;
|
point nextPoint = ctr;
|
||||||
@ -196,8 +215,10 @@ Foam::pointHit Foam::face::nearestPoint
|
|||||||
{
|
{
|
||||||
nextPoint = meshPoints[f[fcIndex(pI)]];
|
nextPoint = meshPoints[f[fcIndex(pI)]];
|
||||||
|
|
||||||
|
label tmpNearType = -1;
|
||||||
|
label tmpNearLabel = -1;
|
||||||
|
|
||||||
// Note: for best accuracy, centre point always comes last
|
// Note: for best accuracy, centre point always comes last
|
||||||
//
|
|
||||||
triPointRef tri
|
triPointRef tri
|
||||||
(
|
(
|
||||||
meshPoints[f[pI]],
|
meshPoints[f[pI]],
|
||||||
@ -205,12 +226,42 @@ Foam::pointHit Foam::face::nearestPoint
|
|||||||
ctr
|
ctr
|
||||||
);
|
);
|
||||||
|
|
||||||
pointHit curHit = tri.nearestPoint(p);
|
pointHit curHit = tri.nearestPointClassify
|
||||||
|
(
|
||||||
|
p,
|
||||||
|
tmpNearType,
|
||||||
|
tmpNearLabel
|
||||||
|
);
|
||||||
|
|
||||||
if (Foam::mag(curHit.distance()) < Foam::mag(nearest.distance()))
|
if (Foam::mag(curHit.distance()) < Foam::mag(nearest.distance()))
|
||||||
{
|
{
|
||||||
nearest.setDistance(curHit.distance());
|
nearest.setDistance(curHit.distance());
|
||||||
|
|
||||||
|
// Assume at first that the near type is NONE on the
|
||||||
|
// triangle (i.e. on the face of the triangle) then it is
|
||||||
|
// therefore also for the face.
|
||||||
|
|
||||||
|
nearType = NONE;
|
||||||
|
|
||||||
|
if (tmpNearType == triPointRef::EDGE && tmpNearLabel == 0)
|
||||||
|
{
|
||||||
|
// If the triangle edge label is 0, then this is also
|
||||||
|
// an edge of the face, if not, it is on the face
|
||||||
|
|
||||||
|
nearType = EDGE;
|
||||||
|
|
||||||
|
nearLabel = pI;
|
||||||
|
}
|
||||||
|
else if (tmpNearType == triPointRef::POINT && tmpNearLabel < 2)
|
||||||
|
{
|
||||||
|
// If the triangle point label is 0 or 1, then this is
|
||||||
|
// also a point of the face, if not, it is on the face
|
||||||
|
|
||||||
|
nearType = POINT;
|
||||||
|
|
||||||
|
nearLabel = pI + tmpNearLabel;
|
||||||
|
}
|
||||||
|
|
||||||
if (curHit.hit())
|
if (curHit.hit())
|
||||||
{
|
{
|
||||||
nearest.setHit();
|
nearest.setHit();
|
||||||
|
|||||||
@ -79,21 +79,6 @@ class triangle
|
|||||||
|
|
||||||
PointRef a_, b_, c_;
|
PointRef a_, b_, c_;
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Fast distance to triangle calculation. From
|
|
||||||
// "Distance Between Point and Trangle in 3D"
|
|
||||||
// David Eberly, Magic Software Inc. Aug. 2002.
|
|
||||||
// Works on function Q giving distance to point and tries to
|
|
||||||
// minimize this.
|
|
||||||
static pointHit nearestPoint
|
|
||||||
(
|
|
||||||
const Point& baseVertex,
|
|
||||||
const vector& E0,
|
|
||||||
const vector& E1,
|
|
||||||
const point& P
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -202,24 +187,27 @@ public:
|
|||||||
const scalar tol = 0.0
|
const scalar tol = 0.0
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return nearest point to p on triangle
|
//- Find the nearest point to p on the triangle and classify it:
|
||||||
inline pointHit nearestPoint
|
// + near point (nearType=POINT, nearLabel=0, 1, 2)
|
||||||
(
|
// + near edge (nearType=EDGE, nearLabel=0, 1, 2)
|
||||||
const point& p
|
|
||||||
) const;
|
|
||||||
|
|
||||||
//- Classify point in triangle plane w.r.t. triangle edges.
|
|
||||||
// - inside (true returned)/outside (false returned)
|
|
||||||
// - near point (nearType=POINT, nearLabel=0, 1, 2)
|
|
||||||
// - near edge (nearType=EDGE, nearLabel=0, 1, 2)
|
|
||||||
// Note: edges are counted from starting
|
// Note: edges are counted from starting
|
||||||
// vertex so e.g. edge 2 is from f[2] to f[0]
|
// vertex so e.g. edge 2 is from f[2] to f[0]
|
||||||
// tol is fraction to account for truncation error. Is only used
|
pointHit nearestPointClassify
|
||||||
// when comparing normalized (0..1) numbers.
|
(
|
||||||
|
const point& p,
|
||||||
|
label& nearType,
|
||||||
|
label& nearLabel
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Return nearest point to p on triangle
|
||||||
|
inline pointHit nearestPoint(const point& p) const;
|
||||||
|
|
||||||
|
//- Classify nearest point to p in triangle plane
|
||||||
|
// w.r.t. triangle edges and points. Returns inside
|
||||||
|
// (true)/outside (false).
|
||||||
bool classify
|
bool classify
|
||||||
(
|
(
|
||||||
const point& p,
|
const point& p,
|
||||||
const scalar tol,
|
|
||||||
label& nearType,
|
label& nearType,
|
||||||
label& nearLabel
|
label& nearLabel
|
||||||
) const;
|
) const;
|
||||||
|
|||||||
@ -32,158 +32,6 @@ License
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Point, class PointRef>
|
|
||||||
pointHit triangle<Point, PointRef>::nearestPoint
|
|
||||||
(
|
|
||||||
const Point& baseVertex,
|
|
||||||
const vector& E0,
|
|
||||||
const vector& E1,
|
|
||||||
const point& P
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// Distance vector
|
|
||||||
const vector D(baseVertex - P);
|
|
||||||
|
|
||||||
// Some geometrical factors
|
|
||||||
const scalar a = E0 & E0;
|
|
||||||
const scalar b = E0 & E1;
|
|
||||||
const scalar c = E1 & E1;
|
|
||||||
|
|
||||||
// Precalculate distance factors
|
|
||||||
const scalar d = E0 & D;
|
|
||||||
const scalar e = E1 & D;
|
|
||||||
const scalar f = D & D;
|
|
||||||
|
|
||||||
// Do classification
|
|
||||||
const scalar det = a*c - b*b;
|
|
||||||
scalar s = b*e - c*d;
|
|
||||||
scalar t = b*d - a*e;
|
|
||||||
|
|
||||||
bool inside = false;
|
|
||||||
|
|
||||||
if (s+t < det)
|
|
||||||
{
|
|
||||||
if (s < 0)
|
|
||||||
{
|
|
||||||
if (t < 0)
|
|
||||||
{
|
|
||||||
// Region 4
|
|
||||||
if (e > 0)
|
|
||||||
{
|
|
||||||
// min on edge t = 0
|
|
||||||
t = 0;
|
|
||||||
s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// min on edge s=0
|
|
||||||
s = 0;
|
|
||||||
t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Region 3. Min on edge s = 0
|
|
||||||
s = 0;
|
|
||||||
t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (t < 0)
|
|
||||||
{
|
|
||||||
// Region 5
|
|
||||||
t = 0;
|
|
||||||
s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Region 0
|
|
||||||
const scalar invDet = 1/det;
|
|
||||||
s *= invDet;
|
|
||||||
t *= invDet;
|
|
||||||
|
|
||||||
inside = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (s < 0)
|
|
||||||
{
|
|
||||||
// Region 2
|
|
||||||
const scalar tmp0 = b + d;
|
|
||||||
const scalar tmp1 = c + e;
|
|
||||||
if (tmp1 > tmp0)
|
|
||||||
{
|
|
||||||
// min on edge s+t=1
|
|
||||||
const scalar numer = tmp1 - tmp0;
|
|
||||||
const scalar denom = a-2*b+c;
|
|
||||||
s = (numer >= denom ? 1 : numer/denom);
|
|
||||||
t = 1 - s;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// min on edge s=0
|
|
||||||
s = 0;
|
|
||||||
t = (tmp1 <= 0 ? 1 : (e >= 0 ? 0 : - e/c));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (t < 0)
|
|
||||||
{
|
|
||||||
// Region 6
|
|
||||||
const scalar tmp0 = b + d;
|
|
||||||
const scalar tmp1 = c + e;
|
|
||||||
if (tmp1 > tmp0)
|
|
||||||
{
|
|
||||||
// min on edge s+t=1
|
|
||||||
const scalar numer = tmp1 - tmp0;
|
|
||||||
const scalar denom = a-2*b+c;
|
|
||||||
s = (numer >= denom ? 1 : numer/denom);
|
|
||||||
t = 1 - s;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// min on edge t=0
|
|
||||||
t = 0;
|
|
||||||
s = (tmp1 <= 0 ? 1 : (d >= 0 ? 0 : - d/a));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Region 1
|
|
||||||
const scalar numer = c+e-(b+d);
|
|
||||||
if (numer <= 0)
|
|
||||||
{
|
|
||||||
s = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const scalar denom = a-2*b+c;
|
|
||||||
s = (numer >= denom ? 1 : numer/denom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
t = 1 - s;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate distance.
|
|
||||||
// Note: Foam::mag used since truncation error causes negative distances
|
|
||||||
// with points very close to one of the triangle vertices.
|
|
||||||
// (Up to -2.77556e-14 seen). Could use +SMALL but that not large enough.
|
|
||||||
|
|
||||||
return pointHit
|
|
||||||
(
|
|
||||||
inside,
|
|
||||||
baseVertex + s*E0 + t*E1,
|
|
||||||
Foam::sqrt
|
|
||||||
(
|
|
||||||
Foam::mag(a*s*s + 2*b*s*t + c*t*t + 2*d*s + 2*e*t + f)
|
|
||||||
),
|
|
||||||
!inside
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Point, class PointRef>
|
template<class Point, class PointRef>
|
||||||
@ -247,7 +95,7 @@ inline Point triangle<Point, PointRef>::centre() const
|
|||||||
template<class Point, class PointRef>
|
template<class Point, class PointRef>
|
||||||
inline scalar triangle<Point, PointRef>::mag() const
|
inline scalar triangle<Point, PointRef>::mag() const
|
||||||
{
|
{
|
||||||
return ::Foam::mag(normal());
|
return Foam::mag(normal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -536,7 +384,7 @@ inline pointHit triangle<Point, PointRef>::ray
|
|||||||
inter.setMiss(eligible);
|
inter.setMiss(eligible);
|
||||||
|
|
||||||
// The miss point is the nearest point on the triangle
|
// The miss point is the nearest point on the triangle
|
||||||
inter.setPoint(nearestPoint(a_, E0, E1, p).rawPoint());
|
inter.setPoint(nearestPoint(p).rawPoint());
|
||||||
|
|
||||||
// The distance to the miss is the distance between the
|
// The distance to the miss is the distance between the
|
||||||
// original point and plane of intersection
|
// original point and plane of intersection
|
||||||
@ -633,18 +481,130 @@ inline pointHit triangle<Point, PointRef>::intersection
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Point, class PointRef>
|
||||||
|
pointHit triangle<Point, PointRef>::nearestPointClassify
|
||||||
|
(
|
||||||
|
const point& p,
|
||||||
|
label& nearType,
|
||||||
|
label& nearLabel
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
// Adapted from:
|
||||||
|
// Real-time collision detection, Christer Ericson, 2005, 136-142
|
||||||
|
|
||||||
|
// Check if P in vertex region outside A
|
||||||
|
vector ab = b_ - a_;
|
||||||
|
vector ac = c_ - a_;
|
||||||
|
vector ap = p - a_;
|
||||||
|
|
||||||
|
scalar d1 = ab & ap;
|
||||||
|
scalar d2 = ac & ap;
|
||||||
|
|
||||||
|
if (d1 <= 0.0 && d2 <= 0.0)
|
||||||
|
{
|
||||||
|
// barycentric coordinates (1, 0, 0)
|
||||||
|
|
||||||
|
nearType = POINT;
|
||||||
|
nearLabel = 0;
|
||||||
|
return pointHit(false, a_, Foam::mag(a_ - p), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if P in vertex region outside B
|
||||||
|
vector bp = p - b_;
|
||||||
|
scalar d3 = ab & bp;
|
||||||
|
scalar d4 = ac & bp;
|
||||||
|
|
||||||
|
if (d3 >= 0.0 && d4 <= d3)
|
||||||
|
{
|
||||||
|
// barycentric coordinates (0, 1, 0)
|
||||||
|
|
||||||
|
nearType = POINT;
|
||||||
|
nearLabel = 1;
|
||||||
|
return pointHit(false, b_, Foam::mag(b_ - p), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if P in edge region of AB, if so return projection of P onto AB
|
||||||
|
scalar vc = d1*d4 - d3*d2;
|
||||||
|
|
||||||
|
if (vc <= 0.0 && d1 >= 0.0 && d3 <= 0.0)
|
||||||
|
{
|
||||||
|
// barycentric coordinates (1-v, v, 0)
|
||||||
|
scalar v = d1/(d1 - d3);
|
||||||
|
|
||||||
|
point nearPt = a_ + v*ab;
|
||||||
|
nearType = EDGE;
|
||||||
|
nearLabel = 0;
|
||||||
|
return pointHit(false, nearPt, Foam::mag(nearPt - p), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if P in vertex region outside C
|
||||||
|
vector cp = p - c_;
|
||||||
|
scalar d5 = ab & cp;
|
||||||
|
scalar d6 = ac & cp;
|
||||||
|
|
||||||
|
if (d6 >= 0.0 && d5 <= d6)
|
||||||
|
{
|
||||||
|
// barycentric coordinates (0, 0, 1)
|
||||||
|
|
||||||
|
nearType = POINT;
|
||||||
|
nearLabel = 2;
|
||||||
|
return pointHit(false, c_, Foam::mag(c_ - p), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if P in edge region of AC, if so return projection of P onto AC
|
||||||
|
scalar vb = d5*d2 - d1*d6;
|
||||||
|
|
||||||
|
if (vb <= 0.0 && d2 >= 0.0 && d6 <= 0.0)
|
||||||
|
{
|
||||||
|
// barycentric coordinates (1-w, 0, w)
|
||||||
|
scalar w = d2/(d2 - d6);
|
||||||
|
|
||||||
|
point nearPt = a_ + w*ac;
|
||||||
|
nearType = EDGE;
|
||||||
|
nearLabel = 2;
|
||||||
|
return pointHit(false, nearPt, Foam::mag(nearPt - p), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if P in edge region of BC, if so return projection of P onto BC
|
||||||
|
scalar va = d3*d6 - d5*d4;
|
||||||
|
|
||||||
|
if (va <= 0.0 && (d4 - d3) >= 0.0 && (d5 - d6) >= 0.0)
|
||||||
|
{
|
||||||
|
// barycentric coordinates (0, 1-w, w)
|
||||||
|
scalar w = (d4 - d3)/((d4 - d3) + (d5 - d6));
|
||||||
|
|
||||||
|
point nearPt = b_ + w*(c_ - b_);
|
||||||
|
nearType = EDGE;
|
||||||
|
nearLabel = 1;
|
||||||
|
return pointHit(false, nearPt, Foam::mag(nearPt - p), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// P inside face region. Compute Q through its barycentric
|
||||||
|
// coordinates (u, v, w)
|
||||||
|
scalar denom = 1.0/(va + vb + vc);
|
||||||
|
scalar v = vb * denom;
|
||||||
|
scalar w = vc * denom;
|
||||||
|
|
||||||
|
// = u*a + v*b + w*c, u = va*denom = 1.0 - v - w
|
||||||
|
|
||||||
|
point nearPt = a_ + ab*v + ac*w;
|
||||||
|
nearType = NONE,
|
||||||
|
nearLabel = -1;
|
||||||
|
return pointHit(true, nearPt, Foam::mag(nearPt - p), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Point, class PointRef>
|
template<class Point, class PointRef>
|
||||||
inline pointHit triangle<Point, PointRef>::nearestPoint
|
inline pointHit triangle<Point, PointRef>::nearestPoint
|
||||||
(
|
(
|
||||||
const point& p
|
const point& p
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Express triangle in terms of baseVertex (point a_) and
|
// Dummy labels
|
||||||
// two edge vectors
|
label nearType = -1;
|
||||||
vector E0 = b_ - a_;
|
label nearLabel = -1;
|
||||||
vector E1 = c_ - a_;
|
|
||||||
|
|
||||||
return nearestPoint(a_, E0, E1, p);
|
return nearestPointClassify(p, nearType, nearLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -652,160 +612,14 @@ template<class Point, class PointRef>
|
|||||||
inline bool triangle<Point, PointRef>::classify
|
inline bool triangle<Point, PointRef>::classify
|
||||||
(
|
(
|
||||||
const point& p,
|
const point& p,
|
||||||
const scalar tol,
|
|
||||||
label& nearType,
|
label& nearType,
|
||||||
label& nearLabel
|
label& nearLabel
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const vector E0 = b_ - a_;
|
return nearestPointClassify(p, nearType, nearLabel).hit();
|
||||||
const vector E1 = c_ - a_;
|
|
||||||
const vector n = 0.5*(E0 ^ E1);
|
|
||||||
|
|
||||||
// Get largest component of normal
|
|
||||||
scalar magX = Foam::mag(n.x());
|
|
||||||
scalar magY = Foam::mag(n.y());
|
|
||||||
scalar magZ = Foam::mag(n.z());
|
|
||||||
|
|
||||||
label i0 = -1;
|
|
||||||
if ((magX >= magY) && (magX >= magZ))
|
|
||||||
{
|
|
||||||
i0 = 0;
|
|
||||||
}
|
|
||||||
else if ((magY >= magX) && (magY >= magZ))
|
|
||||||
{
|
|
||||||
i0 = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i0 = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get other components
|
|
||||||
label i1 = (i0 + 1) % 3;
|
|
||||||
label i2 = (i1 + 1) % 3;
|
|
||||||
|
|
||||||
|
|
||||||
scalar u1 = E0[i1];
|
|
||||||
scalar v1 = E0[i2];
|
|
||||||
|
|
||||||
scalar u2 = E1[i1];
|
|
||||||
scalar v2 = E1[i2];
|
|
||||||
|
|
||||||
scalar det = v2*u1 - u2*v1;
|
|
||||||
|
|
||||||
scalar u0 = p[i1] - a_[i1];
|
|
||||||
scalar v0 = p[i2] - a_[i2];
|
|
||||||
|
|
||||||
scalar alpha = 0;
|
|
||||||
scalar beta = 0;
|
|
||||||
|
|
||||||
bool hit = false;
|
|
||||||
|
|
||||||
if (Foam::mag(u1) < ROOTVSMALL)
|
|
||||||
{
|
|
||||||
beta = u0/u2;
|
|
||||||
|
|
||||||
alpha = (v0 - beta*v2)/v1;
|
|
||||||
|
|
||||||
hit = ((alpha >= 0) && ((alpha + beta) <= 1));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
beta = (v0*u1 - u0*v1)/det;
|
|
||||||
|
|
||||||
alpha = (u0 - beta*u2)/u1;
|
|
||||||
|
|
||||||
hit = ((alpha >= 0) && ((alpha + beta) <= 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Now alpha, beta are the coordinates in the triangle local coordinate
|
|
||||||
// system E0, E1
|
|
||||||
//
|
|
||||||
|
|
||||||
//Pout<< "alpha:" << alpha << endl;
|
|
||||||
//Pout<< "beta:" << beta << endl;
|
|
||||||
//Pout<< "hit:" << hit << endl;
|
|
||||||
//Pout<< "tol:" << tol << endl;
|
|
||||||
|
|
||||||
if (hit)
|
|
||||||
{
|
|
||||||
// alpha,beta might get negative due to precision errors
|
|
||||||
alpha = max(0.0, min(1.0, alpha));
|
|
||||||
beta = max(0.0, min(1.0, beta));
|
|
||||||
}
|
|
||||||
|
|
||||||
nearType = NONE;
|
|
||||||
nearLabel = -1;
|
|
||||||
|
|
||||||
if (Foam::mag(alpha+beta-1) <= tol)
|
|
||||||
{
|
|
||||||
// On edge between vert 1-2 (=edge 1)
|
|
||||||
|
|
||||||
if (Foam::mag(alpha) <= tol)
|
|
||||||
{
|
|
||||||
nearType = POINT;
|
|
||||||
nearLabel = 2;
|
|
||||||
}
|
|
||||||
else if (Foam::mag(beta) <= tol)
|
|
||||||
{
|
|
||||||
nearType = POINT;
|
|
||||||
nearLabel = 1;
|
|
||||||
}
|
|
||||||
else if ((alpha >= 0) && (alpha <= 1) && (beta >= 0) && (beta <= 1))
|
|
||||||
{
|
|
||||||
nearType = EDGE;
|
|
||||||
nearLabel = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Foam::mag(alpha) <= tol)
|
|
||||||
{
|
|
||||||
// On edge between vert 2-0 (=edge 2)
|
|
||||||
|
|
||||||
if (Foam::mag(beta) <= tol)
|
|
||||||
{
|
|
||||||
nearType = POINT;
|
|
||||||
nearLabel = 0;
|
|
||||||
}
|
|
||||||
else if (Foam::mag(beta-1) <= tol)
|
|
||||||
{
|
|
||||||
nearType = POINT;
|
|
||||||
nearLabel = 2;
|
|
||||||
}
|
|
||||||
else if ((beta >= 0) && (beta <= 1))
|
|
||||||
{
|
|
||||||
nearType = EDGE;
|
|
||||||
nearLabel = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Foam::mag(beta) <= tol)
|
|
||||||
{
|
|
||||||
// On edge between vert 0-1 (= edge 0)
|
|
||||||
|
|
||||||
if (Foam::mag(alpha) <= tol)
|
|
||||||
{
|
|
||||||
nearType = POINT;
|
|
||||||
nearLabel = 0;
|
|
||||||
}
|
|
||||||
else if (Foam::mag(alpha-1) <= tol)
|
|
||||||
{
|
|
||||||
nearType = POINT;
|
|
||||||
nearLabel = 1;
|
|
||||||
}
|
|
||||||
else if ((alpha >= 0) && (alpha <= 1))
|
|
||||||
{
|
|
||||||
nearType = EDGE;
|
|
||||||
nearLabel = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return hit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class point, class pointRef>
|
template<class point, class pointRef>
|
||||||
|
|||||||
@ -112,13 +112,6 @@ directMappedVelocityFluxFixedValueFvPatchField
|
|||||||
<< " in file " << dimensionedInternalField().objectPath()
|
<< " in file " << dimensionedInternalField().objectPath()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force calculation of schedule (uses parallel comms)
|
|
||||||
const directMappedPolyPatch& mpp = refCast<const directMappedPolyPatch>
|
|
||||||
(
|
|
||||||
this->patch().patch()
|
|
||||||
);
|
|
||||||
(void)mpp.map().schedule();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,24 +42,26 @@ void Foam::singleCellFvMesh::agglomerateMesh
|
|||||||
const polyBoundaryMesh& oldPatches = mesh.boundaryMesh();
|
const polyBoundaryMesh& oldPatches = mesh.boundaryMesh();
|
||||||
|
|
||||||
// Check agglomeration within patch face range and continuous
|
// Check agglomeration within patch face range and continuous
|
||||||
labelList nAgglom(oldPatches.size());
|
labelList nAgglom(oldPatches.size(), 0);
|
||||||
|
|
||||||
forAll(oldPatches, patchI)
|
forAll(oldPatches, patchI)
|
||||||
{
|
{
|
||||||
const polyPatch& pp = oldPatches[patchI];
|
const polyPatch& pp = oldPatches[patchI];
|
||||||
|
if (pp.size() > 0)
|
||||||
nAgglom[patchI] = max(agglom[patchI])+1;
|
|
||||||
|
|
||||||
forAll(pp, i)
|
|
||||||
{
|
{
|
||||||
if (agglom[patchI][i] < 0 || agglom[patchI][i] >= pp.size())
|
nAgglom[patchI] = max(agglom[patchI])+1;
|
||||||
|
|
||||||
|
forAll(pp, i)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
if (agglom[patchI][i] < 0 || agglom[patchI][i] >= pp.size())
|
||||||
(
|
{
|
||||||
"singleCellFvMesh::agglomerateMesh(..)"
|
FatalErrorIn
|
||||||
) << "agglomeration on patch " << patchI
|
(
|
||||||
<< " is out of range 0.." << pp.size()-1
|
"singleCellFvMesh::agglomerateMesh(..)"
|
||||||
<< exit(FatalError);
|
) << "agglomeration on patch " << patchI
|
||||||
|
<< " is out of range 0.." << pp.size()-1
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,6 +157,8 @@ void Foam::singleCellFvMesh::agglomerateMesh
|
|||||||
|
|
||||||
forAll(oldPatches, patchI)
|
forAll(oldPatches, patchI)
|
||||||
{
|
{
|
||||||
|
patchStarts[patchI] = coarseI;
|
||||||
|
|
||||||
const polyPatch& pp = oldPatches[patchI];
|
const polyPatch& pp = oldPatches[patchI];
|
||||||
|
|
||||||
if (pp.size() > 0)
|
if (pp.size() > 0)
|
||||||
@ -170,8 +174,6 @@ void Foam::singleCellFvMesh::agglomerateMesh
|
|||||||
// From agglomeration to compact patch face
|
// From agglomeration to compact patch face
|
||||||
labelList agglomToFace(nAgglom[patchI], -1);
|
labelList agglomToFace(nAgglom[patchI], -1);
|
||||||
|
|
||||||
patchStarts[patchI] = coarseI;
|
|
||||||
|
|
||||||
forAll(pp, i)
|
forAll(pp, i)
|
||||||
{
|
{
|
||||||
label myAgglom = agglom[patchI][i];
|
label myAgglom = agglom[patchI][i];
|
||||||
@ -223,9 +225,9 @@ void Foam::singleCellFvMesh::agglomerateMesh
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
patchSizes[patchI] = coarseI-patchStarts[patchI];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
patchSizes[patchI] = coarseI-patchStarts[patchI];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pout<< "patchStarts:" << patchStarts << endl;
|
//Pout<< "patchStarts:" << patchStarts << endl;
|
||||||
|
|||||||
@ -44,7 +44,6 @@ octree/octreeDataFace.C
|
|||||||
octree/treeBoundBox.C
|
octree/treeBoundBox.C
|
||||||
octree/treeNodeName.C
|
octree/treeNodeName.C
|
||||||
octree/treeLeafName.C
|
octree/treeLeafName.C
|
||||||
octree/pointIndexHitIOList.C
|
|
||||||
|
|
||||||
indexedOctree/indexedOctreeName.C
|
indexedOctree/indexedOctreeName.C
|
||||||
indexedOctree/treeDataCell.C
|
indexedOctree/treeDataCell.C
|
||||||
|
|||||||
@ -2056,6 +2056,180 @@ void Foam::indexedOctree<Type>::findBox
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class Type>
|
||||||
|
template <class CompareOp>
|
||||||
|
void Foam::indexedOctree<Type>::findNear
|
||||||
|
(
|
||||||
|
const scalar nearDist,
|
||||||
|
const bool okOrder,
|
||||||
|
const indexedOctree<Type>& tree1,
|
||||||
|
const labelBits index1,
|
||||||
|
const treeBoundBox& bb1,
|
||||||
|
const indexedOctree<Type>& tree2,
|
||||||
|
const labelBits index2,
|
||||||
|
const treeBoundBox& bb2,
|
||||||
|
CompareOp& cop
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const vector nearSpan(nearDist, nearDist, nearDist);
|
||||||
|
|
||||||
|
if (tree1.isNode(index1))
|
||||||
|
{
|
||||||
|
const node& nod1 = tree1.nodes()[tree1.getNode(index1)];
|
||||||
|
const treeBoundBox searchBox
|
||||||
|
(
|
||||||
|
bb1.min()-nearSpan,
|
||||||
|
bb1.max()+nearSpan
|
||||||
|
);
|
||||||
|
|
||||||
|
if (tree2.isNode(index2))
|
||||||
|
{
|
||||||
|
if (bb2.overlaps(searchBox))
|
||||||
|
{
|
||||||
|
const node& nod2 = tree2.nodes()[tree2.getNode(index2)];
|
||||||
|
|
||||||
|
for (direction i2 = 0; i2 < nod2.subNodes_.size(); i2++)
|
||||||
|
{
|
||||||
|
labelBits subIndex2 = nod2.subNodes_[i2];
|
||||||
|
const treeBoundBox subBb2
|
||||||
|
(
|
||||||
|
tree2.isNode(subIndex2)
|
||||||
|
? tree2.nodes()[tree2.getNode(subIndex2)].bb_
|
||||||
|
: bb2.subBbox(i2)
|
||||||
|
);
|
||||||
|
|
||||||
|
findNear
|
||||||
|
(
|
||||||
|
nearDist,
|
||||||
|
!okOrder,
|
||||||
|
tree2,
|
||||||
|
subIndex2,
|
||||||
|
subBb2,
|
||||||
|
tree1,
|
||||||
|
index1,
|
||||||
|
bb1,
|
||||||
|
cop
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (tree2.isContent(index2))
|
||||||
|
{
|
||||||
|
// index2 is leaf, index1 not yet.
|
||||||
|
for (direction i1 = 0; i1 < nod1.subNodes_.size(); i1++)
|
||||||
|
{
|
||||||
|
labelBits subIndex1 = nod1.subNodes_[i1];
|
||||||
|
const treeBoundBox subBb1
|
||||||
|
(
|
||||||
|
tree1.isNode(subIndex1)
|
||||||
|
? tree1.nodes()[tree1.getNode(subIndex1)].bb_
|
||||||
|
: bb1.subBbox(i1)
|
||||||
|
);
|
||||||
|
|
||||||
|
findNear
|
||||||
|
(
|
||||||
|
nearDist,
|
||||||
|
!okOrder,
|
||||||
|
tree2,
|
||||||
|
index2,
|
||||||
|
bb2,
|
||||||
|
tree1,
|
||||||
|
subIndex1,
|
||||||
|
subBb1,
|
||||||
|
cop
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (tree1.isContent(index1))
|
||||||
|
{
|
||||||
|
const treeBoundBox searchBox
|
||||||
|
(
|
||||||
|
bb1.min()-nearSpan,
|
||||||
|
bb1.max()+nearSpan
|
||||||
|
);
|
||||||
|
|
||||||
|
if (tree2.isNode(index2))
|
||||||
|
{
|
||||||
|
const node& nod2 =
|
||||||
|
tree2.nodes()[tree2.getNode(index2)];
|
||||||
|
|
||||||
|
if (bb2.overlaps(searchBox))
|
||||||
|
{
|
||||||
|
for (direction i2 = 0; i2 < nod2.subNodes_.size(); i2++)
|
||||||
|
{
|
||||||
|
labelBits subIndex2 = nod2.subNodes_[i2];
|
||||||
|
const treeBoundBox subBb2
|
||||||
|
(
|
||||||
|
tree2.isNode(subIndex2)
|
||||||
|
? tree2.nodes()[tree2.getNode(subIndex2)].bb_
|
||||||
|
: bb2.subBbox(i2)
|
||||||
|
);
|
||||||
|
|
||||||
|
findNear
|
||||||
|
(
|
||||||
|
nearDist,
|
||||||
|
!okOrder,
|
||||||
|
tree2,
|
||||||
|
subIndex2,
|
||||||
|
subBb2,
|
||||||
|
tree1,
|
||||||
|
index1,
|
||||||
|
bb1,
|
||||||
|
cop
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (tree2.isContent(index2))
|
||||||
|
{
|
||||||
|
// Both are leaves. Check n^2.
|
||||||
|
|
||||||
|
const labelList& indices1 =
|
||||||
|
tree1.contents()[tree1.getContent(index1)];
|
||||||
|
const labelList& indices2 =
|
||||||
|
tree2.contents()[tree2.getContent(index2)];
|
||||||
|
|
||||||
|
forAll(indices1, i)
|
||||||
|
{
|
||||||
|
label shape1 = indices1[i];
|
||||||
|
|
||||||
|
forAll(indices2, j)
|
||||||
|
{
|
||||||
|
label shape2 = indices2[j];
|
||||||
|
|
||||||
|
if ((&tree1 != &tree2) || (shape1 != shape2))
|
||||||
|
{
|
||||||
|
if (okOrder)
|
||||||
|
{
|
||||||
|
cop
|
||||||
|
(
|
||||||
|
nearDist,
|
||||||
|
tree1.shapes(),
|
||||||
|
shape1,
|
||||||
|
tree2.shapes(),
|
||||||
|
shape2
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cop
|
||||||
|
(
|
||||||
|
nearDist,
|
||||||
|
tree2.shapes(),
|
||||||
|
shape2,
|
||||||
|
tree1.shapes(),
|
||||||
|
shape1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Number of elements in node.
|
// Number of elements in node.
|
||||||
template <class Type>
|
template <class Type>
|
||||||
Foam::label Foam::indexedOctree<Type>::countElements
|
Foam::label Foam::indexedOctree<Type>::countElements
|
||||||
@ -2620,6 +2794,30 @@ Foam::indexedOctree<Type>::getVolumeType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class Type>
|
||||||
|
template <class CompareOp>
|
||||||
|
void Foam::indexedOctree<Type>::findNear
|
||||||
|
(
|
||||||
|
const scalar nearDist,
|
||||||
|
const indexedOctree<Type>& tree2,
|
||||||
|
CompareOp& cop
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
findNear
|
||||||
|
(
|
||||||
|
nearDist,
|
||||||
|
true,
|
||||||
|
*this,
|
||||||
|
nodePlusOctant(0, 0),
|
||||||
|
bb(),
|
||||||
|
tree2,
|
||||||
|
nodePlusOctant(0, 0),
|
||||||
|
tree2.bb(),
|
||||||
|
cop
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Print contents of nodeI
|
// Print contents of nodeI
|
||||||
template <class Type>
|
template <class Type>
|
||||||
void Foam::indexedOctree<Type>::print
|
void Foam::indexedOctree<Type>::print
|
||||||
|
|||||||
@ -336,6 +336,22 @@ private:
|
|||||||
labelHashSet& elements
|
labelHashSet& elements
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
template <class CompareOp>
|
||||||
|
static void findNear
|
||||||
|
(
|
||||||
|
const scalar nearDist,
|
||||||
|
const bool okOrder,
|
||||||
|
const indexedOctree<Type>& tree1,
|
||||||
|
const labelBits index1,
|
||||||
|
const treeBoundBox& bb1,
|
||||||
|
const indexedOctree<Type>& tree2,
|
||||||
|
const labelBits index2,
|
||||||
|
const treeBoundBox& bb2,
|
||||||
|
CompareOp& cop
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
|
|
||||||
//- Count number of elements on this and sublevels
|
//- Count number of elements on this and sublevels
|
||||||
@ -581,6 +597,16 @@ public:
|
|||||||
const point& sample
|
const point& sample
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Find near pairs and apply CompareOp to them.
|
||||||
|
// tree2 can be *this or different tree.
|
||||||
|
template <class CompareOp>
|
||||||
|
void findNear
|
||||||
|
(
|
||||||
|
const scalar nearDist,
|
||||||
|
const indexedOctree<Type>& tree2,
|
||||||
|
CompareOp& cop
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Write
|
// Write
|
||||||
|
|
||||||
|
|||||||
@ -35,145 +35,145 @@ defineTypeNameAndDebug(Foam::treeDataTriSurface, 0);
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
// Fast distance to triangle calculation. From
|
// // Fast distance to triangle calculation. From
|
||||||
// "Distance Between Point and Trangle in 3D"
|
// // "Distance Between Point and Triangle in 3D"
|
||||||
// David Eberly, Magic Software Inc. Aug. 2003.
|
// // David Eberly, Magic Software Inc. Aug. 2003.
|
||||||
// Works on function Q giving distance to point and tries to minimize this.
|
// // Works on function Q giving distance to point and tries to minimize this.
|
||||||
Foam::scalar Foam::treeDataTriSurface::nearestCoords
|
// Foam::scalar Foam::treeDataTriSurface::nearestCoords
|
||||||
(
|
// (
|
||||||
const point& base,
|
// const point& base,
|
||||||
const point& E0,
|
// const point& E0,
|
||||||
const point& E1,
|
// const point& E1,
|
||||||
const scalar a,
|
// const scalar a,
|
||||||
const scalar b,
|
// const scalar b,
|
||||||
const scalar c,
|
// const scalar c,
|
||||||
const point& P,
|
// const point& P,
|
||||||
scalar& s,
|
// scalar& s,
|
||||||
scalar& t
|
// scalar& t
|
||||||
)
|
// )
|
||||||
{
|
// {
|
||||||
// distance vector
|
// // distance vector
|
||||||
const vector D(base - P);
|
// const vector D(base - P);
|
||||||
|
|
||||||
// Precalculate distance factors.
|
// // Precalculate distance factors.
|
||||||
const scalar d = E0 & D;
|
// const scalar d = E0 & D;
|
||||||
const scalar e = E1 & D;
|
// const scalar e = E1 & D;
|
||||||
|
|
||||||
// Do classification
|
// // Do classification
|
||||||
const scalar det = a*c - b*b;
|
// const scalar det = a*c - b*b;
|
||||||
|
|
||||||
s = b*e - c*d;
|
// s = b*e - c*d;
|
||||||
t = b*d - a*e;
|
// t = b*d - a*e;
|
||||||
|
|
||||||
if (s+t < det)
|
// if (s+t < det)
|
||||||
{
|
// {
|
||||||
if (s < 0)
|
// if (s < 0)
|
||||||
{
|
// {
|
||||||
if (t < 0)
|
// if (t < 0)
|
||||||
{
|
// {
|
||||||
//region 4
|
// //region 4
|
||||||
if (e > 0)
|
// if (e > 0)
|
||||||
{
|
// {
|
||||||
//min on edge t = 0
|
// //min on edge t = 0
|
||||||
t = 0;
|
// t = 0;
|
||||||
s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a));
|
// s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
//min on edge s=0
|
// //min on edge s=0
|
||||||
s = 0;
|
// s = 0;
|
||||||
t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c));
|
// t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
//region 3. Min on edge s = 0
|
// //region 3. Min on edge s = 0
|
||||||
s = 0;
|
// s = 0;
|
||||||
t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c));
|
// t = (e >= 0 ? 0 : (-e >= c ? 1 : -e/c));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if (t < 0)
|
// else if (t < 0)
|
||||||
{
|
// {
|
||||||
//region 5
|
// //region 5
|
||||||
t = 0;
|
// t = 0;
|
||||||
s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a));
|
// s = (d >= 0 ? 0 : (-d >= a ? 1 : -d/a));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
//region 0
|
// //region 0
|
||||||
const scalar invDet = 1/det;
|
// const scalar invDet = 1/det;
|
||||||
s *= invDet;
|
// s *= invDet;
|
||||||
t *= invDet;
|
// t *= invDet;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
if (s < 0)
|
// if (s < 0)
|
||||||
{
|
// {
|
||||||
//region 2
|
// //region 2
|
||||||
const scalar tmp0 = b + d;
|
// const scalar tmp0 = b + d;
|
||||||
const scalar tmp1 = c + e;
|
// const scalar tmp1 = c + e;
|
||||||
if (tmp1 > tmp0)
|
// if (tmp1 > tmp0)
|
||||||
{
|
// {
|
||||||
//min on edge s+t=1
|
// //min on edge s+t=1
|
||||||
const scalar numer = tmp1 - tmp0;
|
// const scalar numer = tmp1 - tmp0;
|
||||||
const scalar denom = a-2*b+c;
|
// const scalar denom = a-2*b+c;
|
||||||
s = (numer >= denom ? 1 : numer/denom);
|
// s = (numer >= denom ? 1 : numer/denom);
|
||||||
t = 1 - s;
|
// t = 1 - s;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
//min on edge s=0
|
// //min on edge s=0
|
||||||
s = 0;
|
// s = 0;
|
||||||
t = (tmp1 <= 0 ? 1 : (e >= 0 ? 0 : - e/c));
|
// t = (tmp1 <= 0 ? 1 : (e >= 0 ? 0 : - e/c));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if (t < 0)
|
// else if (t < 0)
|
||||||
{
|
// {
|
||||||
//region 6
|
// //region 6
|
||||||
const scalar tmp0 = b + d;
|
// const scalar tmp0 = b + d;
|
||||||
const scalar tmp1 = c + e;
|
// const scalar tmp1 = c + e;
|
||||||
if (tmp1 > tmp0)
|
// if (tmp1 > tmp0)
|
||||||
{
|
// {
|
||||||
//min on edge s+t=1
|
// //min on edge s+t=1
|
||||||
const scalar numer = tmp1 - tmp0;
|
// const scalar numer = tmp1 - tmp0;
|
||||||
const scalar denom = a-2*b+c;
|
// const scalar denom = a-2*b+c;
|
||||||
s = (numer >= denom ? 1 : numer/denom);
|
// s = (numer >= denom ? 1 : numer/denom);
|
||||||
t = 1 - s;
|
// t = 1 - s;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
//min on edge t=0
|
// //min on edge t=0
|
||||||
t = 0;
|
// t = 0;
|
||||||
s = (tmp1 <= 0 ? 1 : (d >= 0 ? 0 : - d/a));
|
// s = (tmp1 <= 0 ? 1 : (d >= 0 ? 0 : - d/a));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
//region 1
|
// //region 1
|
||||||
const scalar numer = c+e-(b+d);
|
// const scalar numer = c+e-(b+d);
|
||||||
if (numer <= 0)
|
// if (numer <= 0)
|
||||||
{
|
// {
|
||||||
s = 0;
|
// s = 0;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
const scalar denom = a-2*b+c;
|
// const scalar denom = a-2*b+c;
|
||||||
s = (numer >= denom ? 1 : numer/denom);
|
// s = (numer >= denom ? 1 : numer/denom);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
t = 1 - s;
|
// t = 1 - s;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// Calculate distance.
|
// // Calculate distance.
|
||||||
// Note: abs should not be needed but truncation error causes problems
|
// // Note: abs should not be needed but truncation error causes problems
|
||||||
// with points very close to one of the triangle vertices.
|
// // with points very close to one of the triangle vertices.
|
||||||
// (seen up to -9e-15). Alternatively add some small value.
|
// // (seen up to -9e-15). Alternatively add some small value.
|
||||||
|
|
||||||
const scalar f = D & D;
|
// const scalar f = D & D;
|
||||||
return Foam::mag(a*s*s + 2*b*s*t + c*t*t + 2*d*s + 2*e*t + f);
|
// return Foam::mag(a*s*s + 2*b*s*t + c*t*t + 2*d*s + 2*e*t + f);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -234,9 +234,7 @@ Foam::label Foam::treeDataTriSurface::getVolumeType
|
|||||||
(
|
(
|
||||||
surface_,
|
surface_,
|
||||||
sample,
|
sample,
|
||||||
pHit.index(),
|
pHit.index()
|
||||||
pHit.hitPoint(),
|
|
||||||
indexedOctree<treeDataTriSurface>::perturbTol()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (t == triSurfaceTools::UNKNOWN)
|
if (t == triSurfaceTools::UNKNOWN)
|
||||||
@ -353,39 +351,43 @@ void Foam::treeDataTriSurface::findNearest
|
|||||||
// )
|
// )
|
||||||
//)
|
//)
|
||||||
{
|
{
|
||||||
// Get spanning vectors of triangle
|
// // Get spanning vectors of triangle
|
||||||
vector base(p1);
|
// vector base(p1);
|
||||||
vector E0(p0 - p1);
|
// vector E0(p0 - p1);
|
||||||
vector E1(p2 - p1);
|
// vector E1(p2 - p1);
|
||||||
|
|
||||||
scalar a(E0& E0);
|
// scalar a(E0& E0);
|
||||||
scalar b(E0& E1);
|
// scalar b(E0& E1);
|
||||||
scalar c(E1& E1);
|
// scalar c(E1& E1);
|
||||||
|
|
||||||
// Get nearest point in s,t coordinates (s is along E0, t is along
|
// // Get nearest point in s,t coordinates (s is along E0, t
|
||||||
// E1)
|
// // is along E1)
|
||||||
scalar s;
|
// scalar s;
|
||||||
scalar t;
|
// scalar t;
|
||||||
|
|
||||||
scalar distSqr = nearestCoords
|
// scalar distSqr = nearestCoords
|
||||||
(
|
// (
|
||||||
base,
|
// base,
|
||||||
E0,
|
// E0,
|
||||||
E1,
|
// E1,
|
||||||
a,
|
// a,
|
||||||
b,
|
// b,
|
||||||
c,
|
// c,
|
||||||
sample,
|
// sample,
|
||||||
|
|
||||||
s,
|
// s,
|
||||||
t
|
// t
|
||||||
);
|
// );
|
||||||
|
|
||||||
|
pointHit pHit = triPointRef(p0, p1, p2).nearestPoint(sample);
|
||||||
|
|
||||||
|
scalar distSqr = sqr(pHit.distance());
|
||||||
|
|
||||||
if (distSqr < nearestDistSqr)
|
if (distSqr < nearestDistSqr)
|
||||||
{
|
{
|
||||||
nearestDistSqr = distSqr;
|
nearestDistSqr = distSqr;
|
||||||
minIndex = index;
|
minIndex = index;
|
||||||
nearestPoint = base + s*E0 + t*E1;
|
nearestPoint = pHit.rawPoint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,20 +60,20 @@ class treeDataTriSurface
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- fast triangle nearest point calculation. Returns point in E0, E1
|
// //- fast triangle nearest point calculation. Returns point in E0, E1
|
||||||
// coordinate system: base + s*E0 + t*E1
|
// // coordinate system: base + s*E0 + t*E1
|
||||||
static scalar nearestCoords
|
// static scalar nearestCoords
|
||||||
(
|
// (
|
||||||
const point& base,
|
// const point& base,
|
||||||
const point& E0,
|
// const point& E0,
|
||||||
const point& E1,
|
// const point& E1,
|
||||||
const scalar a,
|
// const scalar a,
|
||||||
const scalar b,
|
// const scalar b,
|
||||||
const scalar c,
|
// const scalar c,
|
||||||
const point& P,
|
// const point& P,
|
||||||
scalar& s,
|
// scalar& s,
|
||||||
scalar& t
|
// scalar& t
|
||||||
);
|
// );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -430,10 +430,7 @@ bool Foam::edgeIntersections::offsetPerturb
|
|||||||
|
|
||||||
point ctr = tri.centre();
|
point ctr = tri.centre();
|
||||||
|
|
||||||
// Get measure for tolerance.
|
tri.classify(pHit.hitPoint(), nearType, nearLabel);
|
||||||
scalar tolDim = 0.001*mag(tri.a() - ctr);
|
|
||||||
|
|
||||||
tri.classify(pHit.hitPoint(), tolDim, nearType, nearLabel);
|
|
||||||
|
|
||||||
if (nearType == triPointRef::POINT || nearType == triPointRef::EDGE)
|
if (nearType == triPointRef::POINT || nearType == triPointRef::EDGE)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -315,7 +315,7 @@ void Foam::surfaceIntersection::classifyHit
|
|||||||
surf2Pts[f2[0]],
|
surf2Pts[f2[0]],
|
||||||
surf2Pts[f2[1]],
|
surf2Pts[f2[1]],
|
||||||
surf2Pts[f2[2]]
|
surf2Pts[f2[2]]
|
||||||
).classify(pHit.hitPoint(), tolDim, nearType, nearLabel);
|
).classify(pHit.hitPoint(), nearType, nearLabel);
|
||||||
|
|
||||||
// Classify points on edge of surface1
|
// Classify points on edge of surface1
|
||||||
label edgeEnd =
|
label edgeEnd =
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::scalar Foam::octreeDataTriSurface::tol(1E-6);
|
|||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
// Fast distance to triangle calculation. From
|
// Fast distance to triangle calculation. From
|
||||||
// "Distance Between Point and Trangle in 3D"
|
// "Distance Between Point and Triangle in 3D"
|
||||||
// David Eberly, Magic Software Inc. Aug. 2003.
|
// David Eberly, Magic Software Inc. Aug. 2003.
|
||||||
// Works on function Q giving distance to point and tries to minimize this.
|
// Works on function Q giving distance to point and tries to minimize this.
|
||||||
void Foam::octreeDataTriSurface::nearestCoords
|
void Foam::octreeDataTriSurface::nearestCoords
|
||||||
|
|||||||
@ -234,9 +234,7 @@ void Foam::orientedSurface::propagateOrientation
|
|||||||
(
|
(
|
||||||
s,
|
s,
|
||||||
samplePoint,
|
samplePoint,
|
||||||
nearestFaceI,
|
nearestFaceI
|
||||||
nearestPt,
|
|
||||||
10*SMALL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (side == triSurfaceTools::UNKNOWN)
|
if (side == triSurfaceTools::UNKNOWN)
|
||||||
|
|||||||
@ -2121,12 +2121,13 @@ Foam::vector Foam::triSurfaceTools::surfaceNormal
|
|||||||
|
|
||||||
label nearType;
|
label nearType;
|
||||||
label nearLabel;
|
label nearLabel;
|
||||||
|
|
||||||
triPointRef
|
triPointRef
|
||||||
(
|
(
|
||||||
points[f[0]],
|
points[f[0]],
|
||||||
points[f[1]],
|
points[f[1]],
|
||||||
points[f[2]]
|
points[f[2]]
|
||||||
).classify(nearestPt, 1E-6, nearType, nearLabel);
|
).classify(nearestPt, nearType, nearLabel);
|
||||||
|
|
||||||
if (nearType == triPointRef::NONE)
|
if (nearType == triPointRef::NONE)
|
||||||
{
|
{
|
||||||
@ -2199,28 +2200,61 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide
|
|||||||
(
|
(
|
||||||
const triSurface& surf,
|
const triSurface& surf,
|
||||||
const point& sample,
|
const point& sample,
|
||||||
const label nearestFaceI, // nearest face
|
const label nearestFaceI
|
||||||
const point& nearestPoint, // nearest point on nearest face
|
|
||||||
const scalar tol
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const labelledTri& f = surf[nearestFaceI];
|
const labelledTri& f = surf[nearestFaceI];
|
||||||
const pointField& points = surf.points();
|
const pointField& points = surf.points();
|
||||||
|
|
||||||
// Find where point is on triangle. Note tolerance needed. Is relative
|
// Find where point is on triangle.
|
||||||
// one (used in comparing normalized [0..1] triangle coordinates).
|
|
||||||
label nearType, nearLabel;
|
label nearType, nearLabel;
|
||||||
triPointRef
|
|
||||||
|
pointHit pHit = triPointRef
|
||||||
(
|
(
|
||||||
points[f[0]],
|
points[f[0]],
|
||||||
points[f[1]],
|
points[f[1]],
|
||||||
points[f[2]]
|
points[f[2]]
|
||||||
).classify(nearestPoint, tol, nearType, nearLabel);
|
).nearestPointClassify(sample, nearType, nearLabel);
|
||||||
|
|
||||||
|
const point& nearestPoint(pHit.rawPoint());
|
||||||
|
|
||||||
if (nearType == triPointRef::NONE)
|
if (nearType == triPointRef::NONE)
|
||||||
{
|
{
|
||||||
|
vector sampleNearestVec = (sample - nearestPoint);
|
||||||
|
|
||||||
// Nearest to face interior. Use faceNormal to determine side
|
// Nearest to face interior. Use faceNormal to determine side
|
||||||
scalar c = (sample - nearestPoint) & surf.faceNormals()[nearestFaceI];
|
scalar c = sampleNearestVec & surf.faceNormals()[nearestFaceI];
|
||||||
|
|
||||||
|
// // If the sample is essentially on the face, do not check for
|
||||||
|
// // it being perpendicular.
|
||||||
|
|
||||||
|
// scalar magSampleNearestVec = mag(sampleNearestVec);
|
||||||
|
|
||||||
|
// if (magSampleNearestVec > SMALL)
|
||||||
|
// {
|
||||||
|
// c /= magSampleNearestVec*mag(surf.faceNormals()[nearestFaceI]);
|
||||||
|
|
||||||
|
// if (mag(c) < 0.99)
|
||||||
|
// {
|
||||||
|
// FatalErrorIn("triSurfaceTools::surfaceSide")
|
||||||
|
// << "nearestPoint identified as being on triangle face "
|
||||||
|
// << "but vector from nearestPoint to sample is not "
|
||||||
|
// << "perpendicular to the normal." << nl
|
||||||
|
// << "sample: " << sample << nl
|
||||||
|
// << "nearestPoint: " << nearestPoint << nl
|
||||||
|
// << "sample - nearestPoint: "
|
||||||
|
// << sample - nearestPoint << nl
|
||||||
|
// << "normal: " << surf.faceNormals()[nearestFaceI] << nl
|
||||||
|
// << "mag(sample - nearestPoint): "
|
||||||
|
// << mag(sample - nearestPoint) << nl
|
||||||
|
// << "normalised dot product: " << c << nl
|
||||||
|
// << "triangle vertices: " << nl
|
||||||
|
// << " " << points[f[0]] << nl
|
||||||
|
// << " " << points[f[1]] << nl
|
||||||
|
// << " " << points[f[2]] << nl
|
||||||
|
// << abort(FatalError);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (c > 0)
|
if (c > 0)
|
||||||
{
|
{
|
||||||
@ -2239,13 +2273,13 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide
|
|||||||
// Get the edge. Assume order of faceEdges same as face vertices.
|
// Get the edge. Assume order of faceEdges same as face vertices.
|
||||||
label edgeI = surf.faceEdges()[nearestFaceI][nearLabel];
|
label edgeI = surf.faceEdges()[nearestFaceI][nearLabel];
|
||||||
|
|
||||||
//if (debug)
|
// if (debug)
|
||||||
//{
|
// {
|
||||||
// // Check order of faceEdges same as face vertices.
|
// // Check order of faceEdges same as face vertices.
|
||||||
// const edge& e = surf.edges()[edgeI];
|
// const edge& e = surf.edges()[edgeI];
|
||||||
// const labelList& meshPoints = surf.meshPoints();
|
// const labelList& meshPoints = surf.meshPoints();
|
||||||
// const edge meshEdge(meshPoints[e[0]], meshPoints[e[1]]);
|
// const edge meshEdge(meshPoints[e[0]], meshPoints[e[1]]);
|
||||||
//
|
|
||||||
// if
|
// if
|
||||||
// (
|
// (
|
||||||
// meshEdge
|
// meshEdge
|
||||||
@ -2259,7 +2293,7 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide
|
|||||||
// << " in face " << f
|
// << " in face " << f
|
||||||
// << abort(FatalError);
|
// << abort(FatalError);
|
||||||
// }
|
// }
|
||||||
//}
|
// }
|
||||||
|
|
||||||
return edgeSide(surf, sample, nearestPoint, edgeI);
|
return edgeSide(surf, sample, nearestPoint, edgeI);
|
||||||
}
|
}
|
||||||
@ -2717,7 +2751,14 @@ void Foam::triSurfaceTools::calcInterpolationWeights
|
|||||||
|
|
||||||
triPointRef tri(f.tri(points));
|
triPointRef tri(f.tri(points));
|
||||||
|
|
||||||
pointHit nearest = tri.nearestPoint(samplePt);
|
label nearType, nearLabel;
|
||||||
|
|
||||||
|
pointHit nearest = tri.nearestPointClassify
|
||||||
|
(
|
||||||
|
samplePt,
|
||||||
|
nearType,
|
||||||
|
nearLabel
|
||||||
|
);
|
||||||
|
|
||||||
if (nearest.hit())
|
if (nearest.hit())
|
||||||
{
|
{
|
||||||
@ -2741,14 +2782,6 @@ void Foam::triSurfaceTools::calcInterpolationWeights
|
|||||||
minDistance = nearest.distance();
|
minDistance = nearest.distance();
|
||||||
|
|
||||||
// Outside triangle. Store nearest.
|
// Outside triangle. Store nearest.
|
||||||
label nearType, nearLabel;
|
|
||||||
tri.classify
|
|
||||||
(
|
|
||||||
nearest.rawPoint(),
|
|
||||||
1E-6, // relative tolerance
|
|
||||||
nearType,
|
|
||||||
nearLabel
|
|
||||||
);
|
|
||||||
|
|
||||||
if (nearType == triPointRef::POINT)
|
if (nearType == triPointRef::POINT)
|
||||||
{
|
{
|
||||||
@ -2779,12 +2812,12 @@ void Foam::triSurfaceTools::calcInterpolationWeights
|
|||||||
max
|
max
|
||||||
(
|
(
|
||||||
0,
|
0,
|
||||||
mag(nearest.rawPoint()-p0)/mag(p1-p0)
|
mag(nearest.rawPoint() - p0)/mag(p1 - p0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Interpolate
|
// Interpolate
|
||||||
weights[0] = 1-s;
|
weights[0] = 1 - s;
|
||||||
weights[1] = s;
|
weights[1] = s;
|
||||||
weights[2] = -GREAT;
|
weights[2] = -GREAT;
|
||||||
|
|
||||||
@ -2830,7 +2863,6 @@ Foam::surfaceLocation Foam::triSurfaceTools::classify
|
|||||||
triPointRef(s[triI].tri(s.points())).classify
|
triPointRef(s[triI].tri(s.points())).classify
|
||||||
(
|
(
|
||||||
trianglePoint,
|
trianglePoint,
|
||||||
1E-6,
|
|
||||||
elemType,
|
elemType,
|
||||||
index
|
index
|
||||||
);
|
);
|
||||||
|
|||||||
@ -458,9 +458,7 @@ public:
|
|||||||
(
|
(
|
||||||
const triSurface& surf,
|
const triSurface& surf,
|
||||||
const point& sample,
|
const point& sample,
|
||||||
const label nearestFaceI, // nearest face
|
const label nearestFaceI
|
||||||
const point& nearestPt, // nearest point on nearest face
|
|
||||||
const scalar tol // tolerance for nearness test.
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Triangulation of faces
|
// Triangulation of faces
|
||||||
|
|||||||
@ -168,7 +168,6 @@ bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
|
|||||||
td.keepParticle
|
td.keepParticle
|
||||||
&& !td.switchProcessor
|
&& !td.switchProcessor
|
||||||
&& lifeTime_ > 0
|
&& lifeTime_ > 0
|
||||||
&& tEnd > ROOTVSMALL
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// TBD: implement subcycling so step through cells in more than
|
// TBD: implement subcycling so step through cells in more than
|
||||||
@ -191,6 +190,12 @@ bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
|
|||||||
|
|
||||||
tEnd -= dt;
|
tEnd -= dt;
|
||||||
stepFraction() = 1.0 - tEnd/deltaT;
|
stepFraction() = 1.0 - tEnd/deltaT;
|
||||||
|
|
||||||
|
if (tEnd <= ROOTVSMALL)
|
||||||
|
{
|
||||||
|
// Force removal
|
||||||
|
lifeTime_ = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!td.keepParticle || lifeTime_ == 0)
|
if (!td.keepParticle || lifeTime_ == 0)
|
||||||
|
|||||||
@ -89,20 +89,29 @@ void Foam::distanceSurface::createGeometry()
|
|||||||
|
|
||||||
if (signed_)
|
if (signed_)
|
||||||
{
|
{
|
||||||
vectorField normal;
|
List<searchableSurface::volumeType> volType;
|
||||||
surfPtr_().getNormal(nearest, normal);
|
|
||||||
|
|
||||||
forAll(nearest, i)
|
surfPtr_().getVolumeType(cc, volType);
|
||||||
|
|
||||||
|
forAll(volType, i)
|
||||||
{
|
{
|
||||||
vector d(cc[i]-nearest[i].hitPoint());
|
searchableSurface::volumeType vT = volType[i];
|
||||||
|
|
||||||
if ((d&normal[i]) > 0)
|
if (vT == searchableSurface::OUTSIDE)
|
||||||
{
|
{
|
||||||
fld[i] = Foam::mag(d);
|
fld[i] = Foam::mag(cc[i] - nearest[i].hitPoint());
|
||||||
|
}
|
||||||
|
else if (vT == searchableSurface::INSIDE)
|
||||||
|
{
|
||||||
|
fld[i] = -Foam::mag(cc[i] - nearest[i].hitPoint());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fld[i] = -Foam::mag(d);
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"void Foam::distanceSurface::createGeometry()"
|
||||||
|
) << "getVolumeType failure, neither INSIDE or OUTSIDE"
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,20 +141,30 @@ void Foam::distanceSurface::createGeometry()
|
|||||||
|
|
||||||
if (signed_)
|
if (signed_)
|
||||||
{
|
{
|
||||||
vectorField normal;
|
List<searchableSurface::volumeType> volType;
|
||||||
surfPtr_().getNormal(nearest, normal);
|
|
||||||
|
|
||||||
forAll(nearest, i)
|
surfPtr_().getVolumeType(cc, volType);
|
||||||
|
|
||||||
|
forAll(volType, i)
|
||||||
{
|
{
|
||||||
vector d(cc[i]-nearest[i].hitPoint());
|
searchableSurface::volumeType vT = volType[i];
|
||||||
|
|
||||||
if ((d&normal[i]) > 0)
|
if (vT == searchableSurface::OUTSIDE)
|
||||||
{
|
{
|
||||||
fld[i] = Foam::mag(d);
|
fld[i] = Foam::mag(cc[i] - nearest[i].hitPoint());
|
||||||
|
}
|
||||||
|
else if (vT == searchableSurface::INSIDE)
|
||||||
|
{
|
||||||
|
fld[i] = -Foam::mag(cc[i] - nearest[i].hitPoint());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fld[i] = -Foam::mag(d);
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"void Foam::distanceSurface::createGeometry()"
|
||||||
|
) << "getVolumeType failure, "
|
||||||
|
<< "neither INSIDE or OUTSIDE"
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,20 +198,31 @@ void Foam::distanceSurface::createGeometry()
|
|||||||
|
|
||||||
if (signed_)
|
if (signed_)
|
||||||
{
|
{
|
||||||
vectorField normal;
|
List<searchableSurface::volumeType> volType;
|
||||||
surfPtr_().getNormal(nearest, normal);
|
|
||||||
|
|
||||||
forAll(nearest, i)
|
surfPtr_().getVolumeType(pts, volType);
|
||||||
|
|
||||||
|
forAll(volType, i)
|
||||||
{
|
{
|
||||||
vector d(pts[i]-nearest[i].hitPoint());
|
searchableSurface::volumeType vT = volType[i];
|
||||||
|
|
||||||
if ((d&normal[i]) > 0)
|
if (vT == searchableSurface::OUTSIDE)
|
||||||
{
|
{
|
||||||
pointDistance_[i] = Foam::mag(d);
|
pointDistance_[i] =
|
||||||
|
Foam::mag(pts[i] - nearest[i].hitPoint());
|
||||||
|
}
|
||||||
|
else if (vT == searchableSurface::INSIDE)
|
||||||
|
{
|
||||||
|
pointDistance_[i] =
|
||||||
|
-Foam::mag(pts[i] - nearest[i].hitPoint());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pointDistance_[i] = -Foam::mag(d);
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"void Foam::distanceSurface::createGeometry()"
|
||||||
|
) << "getVolumeType failure, neither INSIDE or OUTSIDE"
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,123 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// block definition for a porosity with an angled inlet/outlet
|
|
||||||
// the porosity is not aligned with the main axes
|
|
||||||
//
|
|
||||||
|
|
||||||
convertToMeters 0.001;
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
// inlet region
|
|
||||||
( -150 0 -25 ) // pt 0 (in1b)
|
|
||||||
( -150 35.35533906 -25 ) // pt 1 (in2b)
|
|
||||||
( -150 0 25 ) // pt 2 (in1f)
|
|
||||||
( -150 35.35533906 25 ) // pt 3 (in2f)
|
|
||||||
|
|
||||||
// join inlet->outlet
|
|
||||||
( 0 0 -25 ) // pt 4 (join1b)
|
|
||||||
( -35.35533906 35.35533906 -25 ) // pt 5 (join2b)
|
|
||||||
( 0 0 25 ) // pt 6 (join1f)
|
|
||||||
( -35.35533906 35.35533906 25 ) // pt 7 (join2f)
|
|
||||||
|
|
||||||
// porosity ends ->outlet
|
|
||||||
( 70.71067812 70.71067812 -25 ) // pt 8 (poro1b)
|
|
||||||
( 35.35533906 106.06601718 -25 ) // pt 9 (poro2b)
|
|
||||||
( 70.71067812 70.71067812 25 ) // pt 10 (poro1f)
|
|
||||||
( 35.35533906 106.06601718 25 ) // pt 11 (poro2f)
|
|
||||||
|
|
||||||
// outlet
|
|
||||||
( 141.42135624 141.42135624 -25 ) // pt 12 (out1b)
|
|
||||||
( 106.06601718 176.7766953 -25 ) // pt 13 (out2b)
|
|
||||||
( 141.42135624 141.42135624 25 ) // pt 14 (out1f)
|
|
||||||
( 106.06601718 176.7766953 25 ) // pt 15 (out2f)
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
hex (0 4 5 1 2 6 7 3)
|
|
||||||
inlet ( 15 20 20 ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// porosity block
|
|
||||||
hex (4 8 9 5 6 10 11 7)
|
|
||||||
porosity ( 20 20 20 ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// outlet block
|
|
||||||
hex (8 12 13 9 10 14 15 11)
|
|
||||||
outlet ( 20 20 20 ) simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
|
||||||
wall front
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(2 6 7 3)
|
|
||||||
// outlet block
|
|
||||||
(10 14 15 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall back
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(1 5 4 0)
|
|
||||||
// outlet block
|
|
||||||
(9 13 12 8)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall wall
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(2 0 4 6)
|
|
||||||
(7 5 1 3)
|
|
||||||
// outlet block
|
|
||||||
(10 8 12 14)
|
|
||||||
(15 13 9 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall porosityWall
|
|
||||||
(
|
|
||||||
// porosity block
|
|
||||||
(6 10 11 7)
|
|
||||||
// porosity block
|
|
||||||
(5 9 8 4)
|
|
||||||
// porosity block
|
|
||||||
(6 4 8 10)
|
|
||||||
(11 9 5 7)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch inlet
|
|
||||||
(
|
|
||||||
(3 1 0 2)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch outlet
|
|
||||||
(
|
|
||||||
(15 13 12 14)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,834 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General macros to create 2D/extruded-2D meshes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
convertToMeters 0.1;
|
|
||||||
|
|
||||||
// Hub radius
|
|
||||||
|
|
||||||
|
|
||||||
// Impeller-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Baffle-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Tank radius
|
|
||||||
|
|
||||||
|
|
||||||
// MRF region radius
|
|
||||||
|
|
||||||
|
|
||||||
// Thickness of 2D slab
|
|
||||||
|
|
||||||
|
|
||||||
// Base z
|
|
||||||
|
|
||||||
|
|
||||||
// Top z
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between hub and impeller tip
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially in each of the two regions between
|
|
||||||
// impeller and baffle tips
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between baffle tip and tank
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells azimuthally in each of the 8 blocks
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells in the thickness of the slab
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(0.2 0 0) // Vertex r0b = 0
|
|
||||||
(0.2 0 0) // Vertex r0sb = 1
|
|
||||||
(0.141421356364228 -0.141421356110391 0) // Vertex r1b = 2
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2b = 3
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2sb = 4
|
|
||||||
(-0.141421355856554 -0.141421356618065 0) // Vertex r3b = 5
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4b = 6
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4sb = 7
|
|
||||||
(-0.141421355856554 0.141421356618065 0) // Vertex r5b = 8
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6b = 9
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6sb = 10
|
|
||||||
(0.141421356364228 0.141421356110391 0) // Vertex r7b = 11
|
|
||||||
|
|
||||||
(0.5 0 0) // Vertex rb0b = 12
|
|
||||||
(0.353553390910569 -0.353553390275978 0) // Vertex rb1b = 13
|
|
||||||
(8.97448368482705e-10 -0.5 0) // Vertex rb2b = 14
|
|
||||||
(-0.353553389641386 -0.353553391545162 0) // Vertex rb3b = 15
|
|
||||||
(-0.5 1.79489673696541e-09 0) // Vertex rb4b = 16
|
|
||||||
(-0.353553389641386 0.353553391545162 0) // Vertex rb5b = 17
|
|
||||||
(8.97448368482705e-10 0.5 0) // Vertex rb6b = 18
|
|
||||||
(0.353553390910569 0.353553390275978 0) // Vertex rb7b = 19
|
|
||||||
|
|
||||||
(0.6 0 0) // Vertex ri0b = 20
|
|
||||||
(0.424264069092683 -0.424264068331174 0) // Vertex ri1b = 21
|
|
||||||
(1.07693804217925e-09 -0.6 0) // Vertex ri2b = 22
|
|
||||||
(-0.424264067569663 -0.424264069854194 0) // Vertex ri3b = 23
|
|
||||||
(-0.6 2.15387608435849e-09 0) // Vertex ri4b = 24
|
|
||||||
(-0.424264067569663 0.424264069854194 0) // Vertex ri5b = 25
|
|
||||||
(1.07693804217925e-09 0.6 0) // Vertex ri6b = 26
|
|
||||||
(0.424264069092683 0.424264068331174 0) // Vertex ri7b = 27
|
|
||||||
|
|
||||||
(0.7 0 0) // Vertex Rb0b = 28
|
|
||||||
(0.494974747274797 -0.494974746386369 0) // Vertex Rb1b = 29
|
|
||||||
(1.25642771587579e-09 -0.7 0) // Vertex Rb2b = 30
|
|
||||||
(-0.49497474549794 -0.494974748163226 0) // Vertex Rb3b = 31
|
|
||||||
(-0.7 2.51285543175157e-09 0) // Vertex Rb4b = 32
|
|
||||||
(-0.49497474549794 0.494974748163226 0) // Vertex Rb5b = 33
|
|
||||||
(1.25642771587579e-09 0.7 0) // Vertex Rb6b = 34
|
|
||||||
(0.494974747274797 0.494974746386369 0) // Vertex Rb7b = 35
|
|
||||||
|
|
||||||
(1 0 0) // Vertex R0b = 36
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1b = 37
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1sb = 38
|
|
||||||
(1.79489673696541e-09 -1 0) // Vertex R2b = 39
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3b = 40
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3sb = 41
|
|
||||||
(-1 3.58979347393082e-09 0) // Vertex R4b = 42
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5b = 43
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5sb = 44
|
|
||||||
(1.79489673696541e-09 1 0) // Vertex R6b = 45
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7b = 46
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7sb = 47
|
|
||||||
|
|
||||||
(0.2 0 0.1) // Vertex r0t = 48
|
|
||||||
(0.2 0 0.1) // Vertex r0st = 49
|
|
||||||
(0.141421356364228 -0.141421356110391 0.1) // Vertex r1t = 50
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2t = 51
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2st = 52
|
|
||||||
(-0.141421355856554 -0.141421356618065 0.1) // Vertex r3t = 53
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4t = 54
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4st = 55
|
|
||||||
(-0.141421355856554 0.141421356618065 0.1) // Vertex r5t = 56
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6t = 57
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6st = 58
|
|
||||||
(0.141421356364228 0.141421356110391 0.1) // Vertex r7t = 59
|
|
||||||
|
|
||||||
(0.5 0 0.1) // Vertex rb0t = 60
|
|
||||||
(0.353553390910569 -0.353553390275978 0.1) // Vertex rb1t = 61
|
|
||||||
(8.97448368482705e-10 -0.5 0.1) // Vertex rb2t = 62
|
|
||||||
(-0.353553389641386 -0.353553391545162 0.1) // Vertex rb3t = 63
|
|
||||||
(-0.5 1.79489673696541e-09 0.1) // Vertex rb4t = 64
|
|
||||||
(-0.353553389641386 0.353553391545162 0.1) // Vertex rb5t = 65
|
|
||||||
(8.97448368482705e-10 0.5 0.1) // Vertex rb6t = 66
|
|
||||||
(0.353553390910569 0.353553390275978 0.1) // Vertex rb7t = 67
|
|
||||||
|
|
||||||
(0.6 0 0.1) // Vertex ri0t = 68
|
|
||||||
(0.424264069092683 -0.424264068331174 0.1) // Vertex ri1t = 69
|
|
||||||
(1.07693804217925e-09 -0.6 0.1) // Vertex ri2t = 70
|
|
||||||
(-0.424264067569663 -0.424264069854194 0.1) // Vertex ri3t = 71
|
|
||||||
(-0.6 2.15387608435849e-09 0.1) // Vertex ri4t = 72
|
|
||||||
(-0.424264067569663 0.424264069854194 0.1) // Vertex ri5t = 73
|
|
||||||
(1.07693804217925e-09 0.6 0.1) // Vertex ri6t = 74
|
|
||||||
(0.424264069092683 0.424264068331174 0.1) // Vertex ri7t = 75
|
|
||||||
|
|
||||||
(0.7 0 0.1) // Vertex Rb0t = 76
|
|
||||||
(0.494974747274797 -0.494974746386369 0.1) // Vertex Rb1t = 77
|
|
||||||
(1.25642771587579e-09 -0.7 0.1) // Vertex Rb2t = 78
|
|
||||||
(-0.49497474549794 -0.494974748163226 0.1) // Vertex Rb3t = 79
|
|
||||||
(-0.7 2.51285543175157e-09 0.1) // Vertex Rb4t = 80
|
|
||||||
(-0.49497474549794 0.494974748163226 0.1) // Vertex Rb5t = 81
|
|
||||||
(1.25642771587579e-09 0.7 0.1) // Vertex Rb6t = 82
|
|
||||||
(0.494974747274797 0.494974746386369 0.1) // Vertex Rb7t = 83
|
|
||||||
|
|
||||||
(1 0 0.1) // Vertex R0t = 84
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1t = 85
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1st = 86
|
|
||||||
(1.79489673696541e-09 -1 0.1) // Vertex R2t = 87
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3t = 88
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3st = 89
|
|
||||||
(-1 3.58979347393082e-09 0.1) // Vertex R4t = 90
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5t = 91
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5st = 92
|
|
||||||
(1.79489673696541e-09 1 0.1) // Vertex R6t = 93
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7t = 94
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7st = 95
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 2 13 12 48 50 61 60)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (2 4 14 13 50 52 62 61)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (3 5 15 14 51 53 63 62)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (5 7 16 15 53 55 64 63)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (6 8 17 16 54 56 65 64)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (8 10 18 17 56 58 66 65)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (9 11 19 18 57 59 67 66)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (11 1 12 19 59 49 60 67)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (12 13 21 20 60 61 69 68)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (13 14 22 21 61 62 70 69)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (14 15 23 22 62 63 71 70)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (15 16 24 23 63 64 72 71)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (16 17 25 24 64 65 73 72)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (17 18 26 25 65 66 74 73)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (18 19 27 26 66 67 75 74)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (19 12 20 27 67 60 68 75)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (20 21 29 28 68 69 77 76)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (21 22 30 29 69 70 78 77)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (22 23 31 30 70 71 79 78)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (23 24 32 31 71 72 80 79)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (24 25 33 32 72 73 81 80)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (25 26 34 33 73 74 82 81)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (26 27 35 34 74 75 83 82)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (27 20 28 35 75 68 76 83)
|
|
||||||
stator
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (28 29 38 36 76 77 86 84)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (29 30 39 37 77 78 87 85)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (30 31 41 39 78 79 89 87)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (31 32 42 40 79 80 90 88)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (32 33 44 42 80 81 92 90)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (33 34 45 43 81 82 93 91)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (34 35 47 45 82 83 95 93)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (35 28 36 46 83 76 84 94)
|
|
||||||
stator
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
arc 0 2 (0.184775906536601 -0.0765366863901046 0)
|
|
||||||
arc 2 4 (0.0765366867217582 -0.184775906399226 0)
|
|
||||||
arc 3 5 (-0.0765366860584508 -0.184775906673977 0)
|
|
||||||
arc 5 7 (-0.18477590626185 -0.0765366870534118 0)
|
|
||||||
arc 6 8 (-0.18477590626185 0.0765366870534118 0)
|
|
||||||
arc 8 10 (-0.0765366860584508 0.184775906673977 0)
|
|
||||||
arc 9 11 (0.0765366867217582 0.184775906399226 0)
|
|
||||||
arc 11 1 (0.184775906536601 0.0765366863901046 0)
|
|
||||||
|
|
||||||
arc 12 13 (0.461939766341503 -0.191341715975262 0)
|
|
||||||
arc 13 14 (0.191341716804395 -0.461939765998065 0)
|
|
||||||
arc 14 15 (-0.191341715146127 -0.461939766684942 0)
|
|
||||||
arc 15 16 (-0.461939765654626 -0.19134171763353 0)
|
|
||||||
arc 16 17 (-0.461939765654626 0.19134171763353 0)
|
|
||||||
arc 17 18 (-0.191341715146127 0.461939766684942 0)
|
|
||||||
arc 18 19 (0.191341716804395 0.461939765998065 0)
|
|
||||||
arc 19 12 (0.461939766341503 0.191341715975262 0)
|
|
||||||
|
|
||||||
arc 20 21 (0.554327719609804 -0.229610059170314 0)
|
|
||||||
arc 21 22 (0.229610060165275 -0.554327719197677 0)
|
|
||||||
arc 22 23 (-0.229610058175352 -0.55432772002193 0)
|
|
||||||
arc 23 24 (-0.554327718785551 -0.229610061160235 0)
|
|
||||||
arc 24 25 (-0.554327718785551 0.229610061160235 0)
|
|
||||||
arc 25 26 (-0.229610058175352 0.55432772002193 0)
|
|
||||||
arc 26 27 (0.229610060165275 0.554327719197677 0)
|
|
||||||
arc 27 20 (0.554327719609804 0.229610059170314 0)
|
|
||||||
|
|
||||||
arc 28 29 (0.646715672878104 -0.267878402365366 0)
|
|
||||||
arc 29 30 (0.267878403526154 -0.64671567239729 0)
|
|
||||||
arc 30 31 (-0.267878401204578 -0.646715673358918 0)
|
|
||||||
arc 31 32 (-0.646715671916476 -0.267878404686941 0)
|
|
||||||
arc 32 33 (-0.646715671916476 0.267878404686941 0)
|
|
||||||
arc 33 34 (-0.267878401204578 0.646715673358918 0)
|
|
||||||
arc 34 35 (0.267878403526154 0.64671567239729 0)
|
|
||||||
arc 35 28 (0.646715672878104 0.267878402365366 0)
|
|
||||||
|
|
||||||
arc 36 38 (0.923879532683006 -0.382683431950523 0)
|
|
||||||
arc 37 39 (0.382683433608791 -0.923879531996129 0)
|
|
||||||
arc 39 41 (-0.382683430292254 -0.923879533369883 0)
|
|
||||||
arc 40 42 (-0.923879531309252 -0.382683435267059 0)
|
|
||||||
arc 42 44 (-0.923879531309252 0.382683435267059 0)
|
|
||||||
arc 43 45 (-0.382683430292254 0.923879533369883 0)
|
|
||||||
arc 45 47 (0.382683433608791 0.923879531996129 0)
|
|
||||||
arc 46 36 (0.923879532683006 0.382683431950523 0)
|
|
||||||
|
|
||||||
arc 48 50 (0.184775906536601 -0.0765366863901046 0.1)
|
|
||||||
arc 50 52 (0.0765366867217582 -0.184775906399226 0.1)
|
|
||||||
arc 51 53 (-0.0765366860584508 -0.184775906673977 0.1)
|
|
||||||
arc 53 55 (-0.18477590626185 -0.0765366870534118 0.1)
|
|
||||||
arc 54 56 (-0.18477590626185 0.0765366870534118 0.1)
|
|
||||||
arc 56 58 (-0.0765366860584508 0.184775906673977 0.1)
|
|
||||||
arc 57 59 (0.0765366867217582 0.184775906399226 0.1)
|
|
||||||
arc 59 49 (0.184775906536601 0.0765366863901046 0.1)
|
|
||||||
|
|
||||||
arc 60 61 (0.461939766341503 -0.191341715975262 0.1)
|
|
||||||
arc 61 62 (0.191341716804395 -0.461939765998065 0.1)
|
|
||||||
arc 62 63 (-0.191341715146127 -0.461939766684942 0.1)
|
|
||||||
arc 63 64 (-0.461939765654626 -0.19134171763353 0.1)
|
|
||||||
arc 64 65 (-0.461939765654626 0.19134171763353 0.1)
|
|
||||||
arc 65 66 (-0.191341715146127 0.461939766684942 0.1)
|
|
||||||
arc 66 67 (0.191341716804395 0.461939765998065 0.1)
|
|
||||||
arc 67 60 (0.461939766341503 0.191341715975262 0.1)
|
|
||||||
|
|
||||||
arc 68 69 (0.554327719609804 -0.229610059170314 0.1)
|
|
||||||
arc 69 70 (0.229610060165275 -0.554327719197677 0.1)
|
|
||||||
arc 70 71 (-0.229610058175352 -0.55432772002193 0.1)
|
|
||||||
arc 71 72 (-0.554327718785551 -0.229610061160235 0.1)
|
|
||||||
arc 72 73 (-0.554327718785551 0.229610061160235 0.1)
|
|
||||||
arc 73 74 (-0.229610058175352 0.55432772002193 0.1)
|
|
||||||
arc 74 75 (0.229610060165275 0.554327719197677 0.1)
|
|
||||||
arc 75 68 (0.554327719609804 0.229610059170314 0.1)
|
|
||||||
|
|
||||||
arc 76 77 (0.646715672878104 -0.267878402365366 0.1)
|
|
||||||
arc 77 78 (0.267878403526154 -0.64671567239729 0.1)
|
|
||||||
arc 78 79 (-0.267878401204578 -0.646715673358918 0.1)
|
|
||||||
arc 79 80 (-0.646715671916476 -0.267878404686941 0.1)
|
|
||||||
arc 80 81 (-0.646715671916476 0.267878404686941 0.1)
|
|
||||||
arc 81 82 (-0.267878401204578 0.646715673358918 0.1)
|
|
||||||
arc 82 83 (0.267878403526154 0.64671567239729 0.1)
|
|
||||||
arc 83 76 (0.646715672878104 0.267878402365366 0.1)
|
|
||||||
|
|
||||||
arc 84 86 (0.923879532683006 -0.382683431950523 0.1)
|
|
||||||
arc 85 87 (0.382683433608791 -0.923879531996129 0.1)
|
|
||||||
arc 87 89 (-0.382683430292254 -0.923879533369883 0.1)
|
|
||||||
arc 88 90 (-0.923879531309252 -0.382683435267059 0.1)
|
|
||||||
arc 90 92 (-0.923879531309252 0.382683435267059 0.1)
|
|
||||||
arc 91 93 (-0.382683430292254 0.923879533369883 0.1)
|
|
||||||
arc 93 95 (0.382683433608791 0.923879531996129 0.1)
|
|
||||||
arc 94 84 (0.923879532683006 0.382683431950523 0.1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
wall rotor
|
|
||||||
(
|
|
||||||
(0 2 50 48)
|
|
||||||
(2 4 52 50)
|
|
||||||
(3 5 53 51)
|
|
||||||
(5 7 55 53)
|
|
||||||
(6 8 56 54)
|
|
||||||
(8 10 58 56)
|
|
||||||
(9 11 59 57)
|
|
||||||
(11 1 49 59)
|
|
||||||
|
|
||||||
(0 12 60 48)
|
|
||||||
(1 12 60 49)
|
|
||||||
|
|
||||||
(3 14 62 51)
|
|
||||||
(4 14 62 52)
|
|
||||||
|
|
||||||
(6 16 64 54)
|
|
||||||
(7 16 64 55)
|
|
||||||
|
|
||||||
(9 18 66 57)
|
|
||||||
(10 18 66 58)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall stator
|
|
||||||
(
|
|
||||||
(36 38 86 84)
|
|
||||||
(37 39 87 85)
|
|
||||||
(39 41 89 87)
|
|
||||||
(40 42 90 88)
|
|
||||||
(42 44 92 90)
|
|
||||||
(43 45 93 91)
|
|
||||||
(45 47 95 93)
|
|
||||||
(46 36 84 94)
|
|
||||||
|
|
||||||
(37 29 77 85)
|
|
||||||
(38 29 77 86)
|
|
||||||
|
|
||||||
(40 31 79 88)
|
|
||||||
(41 31 79 89)
|
|
||||||
|
|
||||||
(43 33 81 91)
|
|
||||||
(44 33 81 92)
|
|
||||||
|
|
||||||
(46 35 83 94)
|
|
||||||
(47 35 83 95)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty front
|
|
||||||
(
|
|
||||||
(48 50 61 60)
|
|
||||||
(50 52 62 61)
|
|
||||||
(51 53 63 62)
|
|
||||||
(53 55 64 63)
|
|
||||||
(54 56 65 64)
|
|
||||||
(56 58 66 65)
|
|
||||||
(57 59 67 66)
|
|
||||||
(59 49 60 67)
|
|
||||||
(60 61 69 68)
|
|
||||||
(61 62 70 69)
|
|
||||||
(62 63 71 70)
|
|
||||||
(63 64 72 71)
|
|
||||||
(64 65 73 72)
|
|
||||||
(65 66 74 73)
|
|
||||||
(66 67 75 74)
|
|
||||||
(67 60 68 75)
|
|
||||||
(68 69 77 76)
|
|
||||||
(69 70 78 77)
|
|
||||||
(70 71 79 78)
|
|
||||||
(71 72 80 79)
|
|
||||||
(72 73 81 80)
|
|
||||||
(73 74 82 81)
|
|
||||||
(74 75 83 82)
|
|
||||||
(75 68 76 83)
|
|
||||||
(76 77 86 84)
|
|
||||||
(77 78 87 85)
|
|
||||||
(78 79 89 87)
|
|
||||||
(79 80 90 88)
|
|
||||||
(80 81 92 90)
|
|
||||||
(81 82 93 91)
|
|
||||||
(82 83 95 93)
|
|
||||||
(83 76 84 94)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty back
|
|
||||||
(
|
|
||||||
(0 12 13 2)
|
|
||||||
(2 13 14 4)
|
|
||||||
(3 14 15 5)
|
|
||||||
(5 15 16 7)
|
|
||||||
(6 16 17 8)
|
|
||||||
(8 17 18 10)
|
|
||||||
(9 18 19 11)
|
|
||||||
(11 19 12 1)
|
|
||||||
(12 20 21 13)
|
|
||||||
(13 21 22 14)
|
|
||||||
(14 22 23 15)
|
|
||||||
(15 23 24 16)
|
|
||||||
(16 24 25 17)
|
|
||||||
(17 25 26 18)
|
|
||||||
(18 26 27 19)
|
|
||||||
(19 27 20 12)
|
|
||||||
(20 28 29 21)
|
|
||||||
(21 29 30 22)
|
|
||||||
(22 30 31 23)
|
|
||||||
(23 31 32 24)
|
|
||||||
(24 32 33 25)
|
|
||||||
(25 33 34 26)
|
|
||||||
(26 34 35 27)
|
|
||||||
(27 35 28 20)
|
|
||||||
(28 36 38 29)
|
|
||||||
(29 37 39 30)
|
|
||||||
(30 39 41 31)
|
|
||||||
(31 40 42 32)
|
|
||||||
(32 42 44 33)
|
|
||||||
(33 43 45 34)
|
|
||||||
(34 45 47 35)
|
|
||||||
(35 46 36 28)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// block definition for a porosity with an angled inlet/outlet
|
|
||||||
// the porosity is not aligned with the main axes
|
|
||||||
//
|
|
||||||
|
|
||||||
convertToMeters 0.001;
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
// inlet region
|
|
||||||
( -150 0 -25 ) // pt 0 (in1b)
|
|
||||||
( -150 35.35533906 -25 ) // pt 1 (in2b)
|
|
||||||
( -150 0 25 ) // pt 2 (in1f)
|
|
||||||
( -150 35.35533906 25 ) // pt 3 (in2f)
|
|
||||||
|
|
||||||
// join inlet->outlet
|
|
||||||
( 0 0 -25 ) // pt 4 (join1b)
|
|
||||||
( -35.35533906 35.35533906 -25 ) // pt 5 (join2b)
|
|
||||||
( 0 0 25 ) // pt 6 (join1f)
|
|
||||||
( -35.35533906 35.35533906 25 ) // pt 7 (join2f)
|
|
||||||
|
|
||||||
// porosity ends ->outlet
|
|
||||||
( 70.71067812 70.71067812 -25 ) // pt 8 (poro1b)
|
|
||||||
( 35.35533906 106.06601718 -25 ) // pt 9 (poro2b)
|
|
||||||
( 70.71067812 70.71067812 25 ) // pt 10 (poro1f)
|
|
||||||
( 35.35533906 106.06601718 25 ) // pt 11 (poro2f)
|
|
||||||
|
|
||||||
// outlet
|
|
||||||
( 141.42135624 141.42135624 -25 ) // pt 12 (out1b)
|
|
||||||
( 106.06601718 176.7766953 -25 ) // pt 13 (out2b)
|
|
||||||
( 141.42135624 141.42135624 25 ) // pt 14 (out1f)
|
|
||||||
( 106.06601718 176.7766953 25 ) // pt 15 (out2f)
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
hex (0 4 5 1 2 6 7 3)
|
|
||||||
inlet ( 15 20 20 ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// porosity block
|
|
||||||
hex (4 8 9 5 6 10 11 7)
|
|
||||||
porosity ( 20 20 20 ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// outlet block
|
|
||||||
hex (8 12 13 9 10 14 15 11)
|
|
||||||
outlet ( 20 20 20 ) simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
|
||||||
wall front
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(2 6 7 3)
|
|
||||||
// outlet block
|
|
||||||
(10 14 15 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall back
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(1 5 4 0)
|
|
||||||
// outlet block
|
|
||||||
(9 13 12 8)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall wall
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(2 0 4 6)
|
|
||||||
(7 5 1 3)
|
|
||||||
// outlet block
|
|
||||||
(10 8 12 14)
|
|
||||||
(15 13 9 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall porosityWall
|
|
||||||
(
|
|
||||||
// porosity block
|
|
||||||
(6 10 11 7)
|
|
||||||
// porosity block
|
|
||||||
(5 9 8 4)
|
|
||||||
// porosity block
|
|
||||||
(6 4 8 10)
|
|
||||||
(11 9 5 7)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch inlet
|
|
||||||
(
|
|
||||||
(3 1 0 2)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch outlet
|
|
||||||
(
|
|
||||||
(15 13 12 14)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,818 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General macros to create 2D/extruded-2D meshes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
convertToMeters 0.1;
|
|
||||||
|
|
||||||
// Hub radius
|
|
||||||
|
|
||||||
|
|
||||||
// Impeller-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Baffle-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Tank radius
|
|
||||||
|
|
||||||
|
|
||||||
// MRF region radius
|
|
||||||
|
|
||||||
|
|
||||||
// Thickness of 2D slab
|
|
||||||
|
|
||||||
|
|
||||||
// Base z
|
|
||||||
|
|
||||||
|
|
||||||
// Top z
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between hub and impeller tip
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially in each of the two regions between
|
|
||||||
// impeller and baffle tips
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between baffle tip and tank
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells azimuthally in each of the 8 blocks
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells in the thickness of the slab
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(0.2 0 0) // Vertex r0b = 0
|
|
||||||
(0.2 0 0) // Vertex r0sb = 1
|
|
||||||
(0.141421356364228 -0.141421356110391 0) // Vertex r1b = 2
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2b = 3
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2sb = 4
|
|
||||||
(-0.141421355856554 -0.141421356618065 0) // Vertex r3b = 5
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4b = 6
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4sb = 7
|
|
||||||
(-0.141421355856554 0.141421356618065 0) // Vertex r5b = 8
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6b = 9
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6sb = 10
|
|
||||||
(0.141421356364228 0.141421356110391 0) // Vertex r7b = 11
|
|
||||||
|
|
||||||
(0.5 0 0) // Vertex rb0b = 12
|
|
||||||
(0.353553390910569 -0.353553390275978 0) // Vertex rb1b = 13
|
|
||||||
(8.97448368482705e-10 -0.5 0) // Vertex rb2b = 14
|
|
||||||
(-0.353553389641386 -0.353553391545162 0) // Vertex rb3b = 15
|
|
||||||
(-0.5 1.79489673696541e-09 0) // Vertex rb4b = 16
|
|
||||||
(-0.353553389641386 0.353553391545162 0) // Vertex rb5b = 17
|
|
||||||
(8.97448368482705e-10 0.5 0) // Vertex rb6b = 18
|
|
||||||
(0.353553390910569 0.353553390275978 0) // Vertex rb7b = 19
|
|
||||||
|
|
||||||
(0.6 0 0) // Vertex ri0b = 20
|
|
||||||
(0.424264069092683 -0.424264068331174 0) // Vertex ri1b = 21
|
|
||||||
(1.07693804217925e-09 -0.6 0) // Vertex ri2b = 22
|
|
||||||
(-0.424264067569663 -0.424264069854194 0) // Vertex ri3b = 23
|
|
||||||
(-0.6 2.15387608435849e-09 0) // Vertex ri4b = 24
|
|
||||||
(-0.424264067569663 0.424264069854194 0) // Vertex ri5b = 25
|
|
||||||
(1.07693804217925e-09 0.6 0) // Vertex ri6b = 26
|
|
||||||
(0.424264069092683 0.424264068331174 0) // Vertex ri7b = 27
|
|
||||||
|
|
||||||
(0.7 0 0) // Vertex Rb0b = 28
|
|
||||||
(0.494974747274797 -0.494974746386369 0) // Vertex Rb1b = 29
|
|
||||||
(1.25642771587579e-09 -0.7 0) // Vertex Rb2b = 30
|
|
||||||
(-0.49497474549794 -0.494974748163226 0) // Vertex Rb3b = 31
|
|
||||||
(-0.7 2.51285543175157e-09 0) // Vertex Rb4b = 32
|
|
||||||
(-0.49497474549794 0.494974748163226 0) // Vertex Rb5b = 33
|
|
||||||
(1.25642771587579e-09 0.7 0) // Vertex Rb6b = 34
|
|
||||||
(0.494974747274797 0.494974746386369 0) // Vertex Rb7b = 35
|
|
||||||
|
|
||||||
(1 0 0) // Vertex R0b = 36
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1b = 37
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1sb = 38
|
|
||||||
(1.79489673696541e-09 -1 0) // Vertex R2b = 39
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3b = 40
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3sb = 41
|
|
||||||
(-1 3.58979347393082e-09 0) // Vertex R4b = 42
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5b = 43
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5sb = 44
|
|
||||||
(1.79489673696541e-09 1 0) // Vertex R6b = 45
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7b = 46
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7sb = 47
|
|
||||||
|
|
||||||
(0.2 0 0.1) // Vertex r0t = 48
|
|
||||||
(0.2 0 0.1) // Vertex r0st = 49
|
|
||||||
(0.141421356364228 -0.141421356110391 0.1) // Vertex r1t = 50
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2t = 51
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2st = 52
|
|
||||||
(-0.141421355856554 -0.141421356618065 0.1) // Vertex r3t = 53
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4t = 54
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4st = 55
|
|
||||||
(-0.141421355856554 0.141421356618065 0.1) // Vertex r5t = 56
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6t = 57
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6st = 58
|
|
||||||
(0.141421356364228 0.141421356110391 0.1) // Vertex r7t = 59
|
|
||||||
|
|
||||||
(0.5 0 0.1) // Vertex rb0t = 60
|
|
||||||
(0.353553390910569 -0.353553390275978 0.1) // Vertex rb1t = 61
|
|
||||||
(8.97448368482705e-10 -0.5 0.1) // Vertex rb2t = 62
|
|
||||||
(-0.353553389641386 -0.353553391545162 0.1) // Vertex rb3t = 63
|
|
||||||
(-0.5 1.79489673696541e-09 0.1) // Vertex rb4t = 64
|
|
||||||
(-0.353553389641386 0.353553391545162 0.1) // Vertex rb5t = 65
|
|
||||||
(8.97448368482705e-10 0.5 0.1) // Vertex rb6t = 66
|
|
||||||
(0.353553390910569 0.353553390275978 0.1) // Vertex rb7t = 67
|
|
||||||
|
|
||||||
(0.6 0 0.1) // Vertex ri0t = 68
|
|
||||||
(0.424264069092683 -0.424264068331174 0.1) // Vertex ri1t = 69
|
|
||||||
(1.07693804217925e-09 -0.6 0.1) // Vertex ri2t = 70
|
|
||||||
(-0.424264067569663 -0.424264069854194 0.1) // Vertex ri3t = 71
|
|
||||||
(-0.6 2.15387608435849e-09 0.1) // Vertex ri4t = 72
|
|
||||||
(-0.424264067569663 0.424264069854194 0.1) // Vertex ri5t = 73
|
|
||||||
(1.07693804217925e-09 0.6 0.1) // Vertex ri6t = 74
|
|
||||||
(0.424264069092683 0.424264068331174 0.1) // Vertex ri7t = 75
|
|
||||||
|
|
||||||
(0.7 0 0.1) // Vertex Rb0t = 76
|
|
||||||
(0.494974747274797 -0.494974746386369 0.1) // Vertex Rb1t = 77
|
|
||||||
(1.25642771587579e-09 -0.7 0.1) // Vertex Rb2t = 78
|
|
||||||
(-0.49497474549794 -0.494974748163226 0.1) // Vertex Rb3t = 79
|
|
||||||
(-0.7 2.51285543175157e-09 0.1) // Vertex Rb4t = 80
|
|
||||||
(-0.49497474549794 0.494974748163226 0.1) // Vertex Rb5t = 81
|
|
||||||
(1.25642771587579e-09 0.7 0.1) // Vertex Rb6t = 82
|
|
||||||
(0.494974747274797 0.494974746386369 0.1) // Vertex Rb7t = 83
|
|
||||||
|
|
||||||
(1 0 0.1) // Vertex R0t = 84
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1t = 85
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1st = 86
|
|
||||||
(1.79489673696541e-09 -1 0.1) // Vertex R2t = 87
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3t = 88
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3st = 89
|
|
||||||
(-1 3.58979347393082e-09 0.1) // Vertex R4t = 90
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5t = 91
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5st = 92
|
|
||||||
(1.79489673696541e-09 1 0.1) // Vertex R6t = 93
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7t = 94
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7st = 95
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 2 13 12 48 50 61 60)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (2 4 14 13 50 52 62 61)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (3 5 15 14 51 53 63 62)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (5 7 16 15 53 55 64 63)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (6 8 17 16 54 56 65 64)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (8 10 18 17 56 58 66 65)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (9 11 19 18 57 59 67 66)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (11 1 12 19 59 49 60 67)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (12 13 21 20 60 61 69 68)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (13 14 22 21 61 62 70 69)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (14 15 23 22 62 63 71 70)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (15 16 24 23 63 64 72 71)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (16 17 25 24 64 65 73 72)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (17 18 26 25 65 66 74 73)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (18 19 27 26 66 67 75 74)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (19 12 20 27 67 60 68 75)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (20 21 29 28 68 69 77 76)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (21 22 30 29 69 70 78 77)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (22 23 31 30 70 71 79 78)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (23 24 32 31 71 72 80 79)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (24 25 33 32 72 73 81 80)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (25 26 34 33 73 74 82 81)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (26 27 35 34 74 75 83 82)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (27 20 28 35 75 68 76 83)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (28 29 38 36 76 77 86 84)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (29 30 39 37 77 78 87 85)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (30 31 41 39 78 79 89 87)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (31 32 42 40 79 80 90 88)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (32 33 44 42 80 81 92 90)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (33 34 45 43 81 82 93 91)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (34 35 47 45 82 83 95 93)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (35 28 36 46 83 76 84 94)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
arc 0 2 (0.184775906536601 -0.0765366863901046 0)
|
|
||||||
arc 2 4 (0.0765366867217582 -0.184775906399226 0)
|
|
||||||
arc 3 5 (-0.0765366860584508 -0.184775906673977 0)
|
|
||||||
arc 5 7 (-0.18477590626185 -0.0765366870534118 0)
|
|
||||||
arc 6 8 (-0.18477590626185 0.0765366870534118 0)
|
|
||||||
arc 8 10 (-0.0765366860584508 0.184775906673977 0)
|
|
||||||
arc 9 11 (0.0765366867217582 0.184775906399226 0)
|
|
||||||
arc 11 1 (0.184775906536601 0.0765366863901046 0)
|
|
||||||
|
|
||||||
arc 12 13 (0.461939766341503 -0.191341715975262 0)
|
|
||||||
arc 13 14 (0.191341716804395 -0.461939765998065 0)
|
|
||||||
arc 14 15 (-0.191341715146127 -0.461939766684942 0)
|
|
||||||
arc 15 16 (-0.461939765654626 -0.19134171763353 0)
|
|
||||||
arc 16 17 (-0.461939765654626 0.19134171763353 0)
|
|
||||||
arc 17 18 (-0.191341715146127 0.461939766684942 0)
|
|
||||||
arc 18 19 (0.191341716804395 0.461939765998065 0)
|
|
||||||
arc 19 12 (0.461939766341503 0.191341715975262 0)
|
|
||||||
|
|
||||||
arc 20 21 (0.554327719609804 -0.229610059170314 0)
|
|
||||||
arc 21 22 (0.229610060165275 -0.554327719197677 0)
|
|
||||||
arc 22 23 (-0.229610058175352 -0.55432772002193 0)
|
|
||||||
arc 23 24 (-0.554327718785551 -0.229610061160235 0)
|
|
||||||
arc 24 25 (-0.554327718785551 0.229610061160235 0)
|
|
||||||
arc 25 26 (-0.229610058175352 0.55432772002193 0)
|
|
||||||
arc 26 27 (0.229610060165275 0.554327719197677 0)
|
|
||||||
arc 27 20 (0.554327719609804 0.229610059170314 0)
|
|
||||||
|
|
||||||
arc 28 29 (0.646715672878104 -0.267878402365366 0)
|
|
||||||
arc 29 30 (0.267878403526154 -0.64671567239729 0)
|
|
||||||
arc 30 31 (-0.267878401204578 -0.646715673358918 0)
|
|
||||||
arc 31 32 (-0.646715671916476 -0.267878404686941 0)
|
|
||||||
arc 32 33 (-0.646715671916476 0.267878404686941 0)
|
|
||||||
arc 33 34 (-0.267878401204578 0.646715673358918 0)
|
|
||||||
arc 34 35 (0.267878403526154 0.64671567239729 0)
|
|
||||||
arc 35 28 (0.646715672878104 0.267878402365366 0)
|
|
||||||
|
|
||||||
arc 36 38 (0.923879532683006 -0.382683431950523 0)
|
|
||||||
arc 37 39 (0.382683433608791 -0.923879531996129 0)
|
|
||||||
arc 39 41 (-0.382683430292254 -0.923879533369883 0)
|
|
||||||
arc 40 42 (-0.923879531309252 -0.382683435267059 0)
|
|
||||||
arc 42 44 (-0.923879531309252 0.382683435267059 0)
|
|
||||||
arc 43 45 (-0.382683430292254 0.923879533369883 0)
|
|
||||||
arc 45 47 (0.382683433608791 0.923879531996129 0)
|
|
||||||
arc 46 36 (0.923879532683006 0.382683431950523 0)
|
|
||||||
|
|
||||||
arc 48 50 (0.184775906536601 -0.0765366863901046 0.1)
|
|
||||||
arc 50 52 (0.0765366867217582 -0.184775906399226 0.1)
|
|
||||||
arc 51 53 (-0.0765366860584508 -0.184775906673977 0.1)
|
|
||||||
arc 53 55 (-0.18477590626185 -0.0765366870534118 0.1)
|
|
||||||
arc 54 56 (-0.18477590626185 0.0765366870534118 0.1)
|
|
||||||
arc 56 58 (-0.0765366860584508 0.184775906673977 0.1)
|
|
||||||
arc 57 59 (0.0765366867217582 0.184775906399226 0.1)
|
|
||||||
arc 59 49 (0.184775906536601 0.0765366863901046 0.1)
|
|
||||||
|
|
||||||
arc 60 61 (0.461939766341503 -0.191341715975262 0.1)
|
|
||||||
arc 61 62 (0.191341716804395 -0.461939765998065 0.1)
|
|
||||||
arc 62 63 (-0.191341715146127 -0.461939766684942 0.1)
|
|
||||||
arc 63 64 (-0.461939765654626 -0.19134171763353 0.1)
|
|
||||||
arc 64 65 (-0.461939765654626 0.19134171763353 0.1)
|
|
||||||
arc 65 66 (-0.191341715146127 0.461939766684942 0.1)
|
|
||||||
arc 66 67 (0.191341716804395 0.461939765998065 0.1)
|
|
||||||
arc 67 60 (0.461939766341503 0.191341715975262 0.1)
|
|
||||||
|
|
||||||
arc 68 69 (0.554327719609804 -0.229610059170314 0.1)
|
|
||||||
arc 69 70 (0.229610060165275 -0.554327719197677 0.1)
|
|
||||||
arc 70 71 (-0.229610058175352 -0.55432772002193 0.1)
|
|
||||||
arc 71 72 (-0.554327718785551 -0.229610061160235 0.1)
|
|
||||||
arc 72 73 (-0.554327718785551 0.229610061160235 0.1)
|
|
||||||
arc 73 74 (-0.229610058175352 0.55432772002193 0.1)
|
|
||||||
arc 74 75 (0.229610060165275 0.554327719197677 0.1)
|
|
||||||
arc 75 68 (0.554327719609804 0.229610059170314 0.1)
|
|
||||||
|
|
||||||
arc 76 77 (0.646715672878104 -0.267878402365366 0.1)
|
|
||||||
arc 77 78 (0.267878403526154 -0.64671567239729 0.1)
|
|
||||||
arc 78 79 (-0.267878401204578 -0.646715673358918 0.1)
|
|
||||||
arc 79 80 (-0.646715671916476 -0.267878404686941 0.1)
|
|
||||||
arc 80 81 (-0.646715671916476 0.267878404686941 0.1)
|
|
||||||
arc 81 82 (-0.267878401204578 0.646715673358918 0.1)
|
|
||||||
arc 82 83 (0.267878403526154 0.64671567239729 0.1)
|
|
||||||
arc 83 76 (0.646715672878104 0.267878402365366 0.1)
|
|
||||||
|
|
||||||
arc 84 86 (0.923879532683006 -0.382683431950523 0.1)
|
|
||||||
arc 85 87 (0.382683433608791 -0.923879531996129 0.1)
|
|
||||||
arc 87 89 (-0.382683430292254 -0.923879533369883 0.1)
|
|
||||||
arc 88 90 (-0.923879531309252 -0.382683435267059 0.1)
|
|
||||||
arc 90 92 (-0.923879531309252 0.382683435267059 0.1)
|
|
||||||
arc 91 93 (-0.382683430292254 0.923879533369883 0.1)
|
|
||||||
arc 93 95 (0.382683433608791 0.923879531996129 0.1)
|
|
||||||
arc 94 84 (0.923879532683006 0.382683431950523 0.1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
wall rotor
|
|
||||||
(
|
|
||||||
(0 2 50 48)
|
|
||||||
(2 4 52 50)
|
|
||||||
(3 5 53 51)
|
|
||||||
(5 7 55 53)
|
|
||||||
(6 8 56 54)
|
|
||||||
(8 10 58 56)
|
|
||||||
(9 11 59 57)
|
|
||||||
(11 1 49 59)
|
|
||||||
|
|
||||||
(0 12 60 48)
|
|
||||||
(1 12 60 49)
|
|
||||||
|
|
||||||
(3 14 62 51)
|
|
||||||
(4 14 62 52)
|
|
||||||
|
|
||||||
(6 16 64 54)
|
|
||||||
(7 16 64 55)
|
|
||||||
|
|
||||||
(9 18 66 57)
|
|
||||||
(10 18 66 58)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall stator
|
|
||||||
(
|
|
||||||
(36 38 86 84)
|
|
||||||
(37 39 87 85)
|
|
||||||
(39 41 89 87)
|
|
||||||
(40 42 90 88)
|
|
||||||
(42 44 92 90)
|
|
||||||
(43 45 93 91)
|
|
||||||
(45 47 95 93)
|
|
||||||
(46 36 84 94)
|
|
||||||
|
|
||||||
(37 29 77 85)
|
|
||||||
(38 29 77 86)
|
|
||||||
|
|
||||||
(40 31 79 88)
|
|
||||||
(41 31 79 89)
|
|
||||||
|
|
||||||
(43 33 81 91)
|
|
||||||
(44 33 81 92)
|
|
||||||
|
|
||||||
(46 35 83 94)
|
|
||||||
(47 35 83 95)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty front
|
|
||||||
(
|
|
||||||
(48 50 61 60)
|
|
||||||
(50 52 62 61)
|
|
||||||
(51 53 63 62)
|
|
||||||
(53 55 64 63)
|
|
||||||
(54 56 65 64)
|
|
||||||
(56 58 66 65)
|
|
||||||
(57 59 67 66)
|
|
||||||
(59 49 60 67)
|
|
||||||
(60 61 69 68)
|
|
||||||
(61 62 70 69)
|
|
||||||
(62 63 71 70)
|
|
||||||
(63 64 72 71)
|
|
||||||
(64 65 73 72)
|
|
||||||
(65 66 74 73)
|
|
||||||
(66 67 75 74)
|
|
||||||
(67 60 68 75)
|
|
||||||
(68 69 77 76)
|
|
||||||
(69 70 78 77)
|
|
||||||
(70 71 79 78)
|
|
||||||
(71 72 80 79)
|
|
||||||
(72 73 81 80)
|
|
||||||
(73 74 82 81)
|
|
||||||
(74 75 83 82)
|
|
||||||
(75 68 76 83)
|
|
||||||
(76 77 86 84)
|
|
||||||
(77 78 87 85)
|
|
||||||
(78 79 89 87)
|
|
||||||
(79 80 90 88)
|
|
||||||
(80 81 92 90)
|
|
||||||
(81 82 93 91)
|
|
||||||
(82 83 95 93)
|
|
||||||
(83 76 84 94)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty back
|
|
||||||
(
|
|
||||||
(0 12 13 2)
|
|
||||||
(2 13 14 4)
|
|
||||||
(3 14 15 5)
|
|
||||||
(5 15 16 7)
|
|
||||||
(6 16 17 8)
|
|
||||||
(8 17 18 10)
|
|
||||||
(9 18 19 11)
|
|
||||||
(11 19 12 1)
|
|
||||||
(12 20 21 13)
|
|
||||||
(13 21 22 14)
|
|
||||||
(14 22 23 15)
|
|
||||||
(15 23 24 16)
|
|
||||||
(16 24 25 17)
|
|
||||||
(17 25 26 18)
|
|
||||||
(18 26 27 19)
|
|
||||||
(19 27 20 12)
|
|
||||||
(20 28 29 21)
|
|
||||||
(21 29 30 22)
|
|
||||||
(22 30 31 23)
|
|
||||||
(23 31 32 24)
|
|
||||||
(24 32 33 25)
|
|
||||||
(25 33 34 26)
|
|
||||||
(26 34 35 27)
|
|
||||||
(27 35 28 20)
|
|
||||||
(28 36 38 29)
|
|
||||||
(29 37 39 30)
|
|
||||||
(30 39 41 31)
|
|
||||||
(31 40 42 32)
|
|
||||||
(32 42 44 33)
|
|
||||||
(33 43 45 34)
|
|
||||||
(34 45 47 35)
|
|
||||||
(35 46 36 28)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// block definition for a porosity with an angled inlet/outlet
|
|
||||||
// the porosity is not aligned with the main axes
|
|
||||||
//
|
|
||||||
|
|
||||||
convertToMeters 0.001;
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
// inlet region
|
|
||||||
( -150 0 -25 ) // pt 0 (in1b)
|
|
||||||
( -150 35.35533906 -25 ) // pt 1 (in2b)
|
|
||||||
( -150 0 25 ) // pt 2 (in1f)
|
|
||||||
( -150 35.35533906 25 ) // pt 3 (in2f)
|
|
||||||
|
|
||||||
// join inlet->outlet
|
|
||||||
( 0 0 -25 ) // pt 4 (join1b)
|
|
||||||
( -35.35533906 35.35533906 -25 ) // pt 5 (join2b)
|
|
||||||
( 0 0 25 ) // pt 6 (join1f)
|
|
||||||
( -35.35533906 35.35533906 25 ) // pt 7 (join2f)
|
|
||||||
|
|
||||||
// porosity ends ->outlet
|
|
||||||
( 70.71067812 70.71067812 -25 ) // pt 8 (poro1b)
|
|
||||||
( 35.35533906 106.06601718 -25 ) // pt 9 (poro2b)
|
|
||||||
( 70.71067812 70.71067812 25 ) // pt 10 (poro1f)
|
|
||||||
( 35.35533906 106.06601718 25 ) // pt 11 (poro2f)
|
|
||||||
|
|
||||||
// outlet
|
|
||||||
( 141.42135624 141.42135624 -25 ) // pt 12 (out1b)
|
|
||||||
( 106.06601718 176.7766953 -25 ) // pt 13 (out2b)
|
|
||||||
( 141.42135624 141.42135624 25 ) // pt 14 (out1f)
|
|
||||||
( 106.06601718 176.7766953 25 ) // pt 15 (out2f)
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
hex (0 4 5 1 2 6 7 3)
|
|
||||||
inlet ( 15 20 20 ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// porosity block
|
|
||||||
hex (4 8 9 5 6 10 11 7)
|
|
||||||
porosity ( 20 20 20 ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// outlet block
|
|
||||||
hex (8 12 13 9 10 14 15 11)
|
|
||||||
outlet ( 20 20 20 ) simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
|
||||||
wall front
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(2 6 7 3)
|
|
||||||
// outlet block
|
|
||||||
(10 14 15 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall back
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(1 5 4 0)
|
|
||||||
// outlet block
|
|
||||||
(9 13 12 8)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall wall
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
(2 0 4 6)
|
|
||||||
(7 5 1 3)
|
|
||||||
// outlet block
|
|
||||||
(10 8 12 14)
|
|
||||||
(15 13 9 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall porosityWall
|
|
||||||
(
|
|
||||||
// porosity block
|
|
||||||
(6 10 11 7)
|
|
||||||
// porosity block
|
|
||||||
(5 9 8 4)
|
|
||||||
// porosity block
|
|
||||||
(6 4 8 10)
|
|
||||||
(11 9 5 7)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch inlet
|
|
||||||
(
|
|
||||||
(3 1 0 2)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch outlet
|
|
||||||
(
|
|
||||||
(15 13 12 14)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,165 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
`format' ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// block definition for a porosity with an angled inlet/outlet
|
|
||||||
// the porosity is not aligned with the main axes
|
|
||||||
//
|
|
||||||
dnl> -----------------------------------------------------------------
|
|
||||||
dnl> <STANDARD DEFINTIONS>
|
|
||||||
dnl>
|
|
||||||
changecom(//)changequote([,]) dnl>
|
|
||||||
define(calc, [esyscmd(perl -e 'print ($1)')]) dnl>
|
|
||||||
define(VCOUNT, 0) dnl>
|
|
||||||
define(vlabel, [[// ]pt VCOUNT ($1) define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) dnl>
|
|
||||||
dnl>
|
|
||||||
define(hex2D, hex ($1b $2b $3b $4b $1f $2f $3f $4f)) dnl>
|
|
||||||
define(quad2D, ($1f $1b $2b $2f)) dnl>
|
|
||||||
define(frontQuad, ($1f $2f $3f $4f)) dnl>
|
|
||||||
define(backQuad, ($4b $3b $2b $1b)) dnl>
|
|
||||||
dnl>
|
|
||||||
dnl> </STANDARD DEFINTIONS>
|
|
||||||
dnl> -----------------------------------------------------------------
|
|
||||||
dnl>
|
|
||||||
define(ncells, 20) dnl>
|
|
||||||
define(ninlet, 15) dnl>
|
|
||||||
define(nporo, 20) dnl>
|
|
||||||
define(noutlet, 20) dnl>
|
|
||||||
dnl>
|
|
||||||
define(x0,0) dnl>
|
|
||||||
define(y0,0) dnl>
|
|
||||||
define(y0,0) dnl>
|
|
||||||
define(Cos,0.7071067812) dnl> == cos(45)
|
|
||||||
define(Sin,0.7071067812) dnl> == sin(45)
|
|
||||||
dnl>
|
|
||||||
define(width,50) dnl>
|
|
||||||
define(zBack,calc(-width/2)) dnl>
|
|
||||||
define(zFront,calc(width/2)) dnl>
|
|
||||||
define(leninlet,150)dnl>
|
|
||||||
define(lenporo,100)dnl>
|
|
||||||
define(lenoutlet,100)dnl>
|
|
||||||
dnl>
|
|
||||||
define(xhyp,calc(Sin*width)) dnl>
|
|
||||||
define(yhyp,calc(Cos*width)) dnl>
|
|
||||||
define(xinlet,leninlet)dnl>
|
|
||||||
define(xporo,calc(Cos*lenporo)) dnl>
|
|
||||||
define(yporo,calc(Sin*lenporo)) dnl>
|
|
||||||
define(xoutlet,calc(xporo + Cos*lenoutlet)) dnl>
|
|
||||||
define(youtlet,calc(yporo + Sin*lenoutlet)) dnl>
|
|
||||||
dnl>
|
|
||||||
|
|
||||||
convertToMeters 0.001;
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
// inlet region
|
|
||||||
( -xinlet y0 zBack ) vlabel(in1b)
|
|
||||||
( -xinlet yhyp zBack ) vlabel(in2b)
|
|
||||||
( -xinlet y0 zFront ) vlabel(in1f)
|
|
||||||
( -xinlet yhyp zFront ) vlabel(in2f)
|
|
||||||
|
|
||||||
// join inlet->outlet
|
|
||||||
( x0 y0 zBack ) vlabel(join1b)
|
|
||||||
( -xhyp yhyp zBack ) vlabel(join2b)
|
|
||||||
( x0 y0 zFront ) vlabel(join1f)
|
|
||||||
( -xhyp yhyp zFront ) vlabel(join2f)
|
|
||||||
|
|
||||||
// porosity ends ->outlet
|
|
||||||
( xporo yporo zBack ) vlabel(poro1b)
|
|
||||||
( calc(xporo - xhyp) calc(yporo + yhyp) zBack ) vlabel(poro2b)
|
|
||||||
( xporo yporo zFront ) vlabel(poro1f)
|
|
||||||
( calc(xporo - xhyp) calc(yporo + yhyp) zFront ) vlabel(poro2f)
|
|
||||||
|
|
||||||
// outlet
|
|
||||||
( xoutlet youtlet zBack ) vlabel(out1b)
|
|
||||||
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zBack ) vlabel(out2b)
|
|
||||||
( xoutlet youtlet zFront ) vlabel(out1f)
|
|
||||||
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zFront ) vlabel(out2f)
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
hex2D(in1, join1, join2, in2)
|
|
||||||
inlet ( ninlet ncells ncells ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// porosity block
|
|
||||||
hex2D(join1, poro1, poro2, join2)
|
|
||||||
porosity ( nporo ncells ncells ) simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// outlet block
|
|
||||||
hex2D(poro1, out1, out2, poro2)
|
|
||||||
outlet ( noutlet ncells ncells ) simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
|
||||||
wall front
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
frontQuad(in1, join1, join2, in2)
|
|
||||||
// outlet block
|
|
||||||
frontQuad(poro1, out1, out2, poro2)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall back
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
backQuad(in1, join1, join2, in2)
|
|
||||||
// outlet block
|
|
||||||
backQuad(poro1, out1, out2, poro2)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall wall
|
|
||||||
(
|
|
||||||
// inlet block
|
|
||||||
quad2D(in1, join1)
|
|
||||||
quad2D(join2, in2)
|
|
||||||
// outlet block
|
|
||||||
quad2D(poro1, out1)
|
|
||||||
quad2D(out2, poro2)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall porosityWall
|
|
||||||
(
|
|
||||||
// porosity block
|
|
||||||
frontQuad(join1, poro1, poro2, join2)
|
|
||||||
// porosity block
|
|
||||||
backQuad(join1, poro1, poro2, join2)
|
|
||||||
// porosity block
|
|
||||||
quad2D(join1, poro1)
|
|
||||||
quad2D(poro2, join2)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch inlet
|
|
||||||
(
|
|
||||||
quad2D(in2, in1)
|
|
||||||
)
|
|
||||||
|
|
||||||
patch outlet
|
|
||||||
(
|
|
||||||
quad2D(out2, out1)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,818 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General macros to create 2D/extruded-2D meshes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
convertToMeters 0.1;
|
|
||||||
|
|
||||||
// Hub radius
|
|
||||||
|
|
||||||
|
|
||||||
// Impeller-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Baffle-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Tank radius
|
|
||||||
|
|
||||||
|
|
||||||
// MRF region radius
|
|
||||||
|
|
||||||
|
|
||||||
// Thickness of 2D slab
|
|
||||||
|
|
||||||
|
|
||||||
// Base z
|
|
||||||
|
|
||||||
|
|
||||||
// Top z
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between hub and impeller tip
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially in each of the two regions between
|
|
||||||
// impeller and baffle tips
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between baffle tip and tank
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells azimuthally in each of the 8 blocks
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells in the thickness of the slab
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(0.2 0 0) // Vertex r0b = 0
|
|
||||||
(0.2 0 0) // Vertex r0sb = 1
|
|
||||||
(0.141421356364228 -0.141421356110391 0) // Vertex r1b = 2
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2b = 3
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2sb = 4
|
|
||||||
(-0.141421355856554 -0.141421356618065 0) // Vertex r3b = 5
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4b = 6
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4sb = 7
|
|
||||||
(-0.141421355856554 0.141421356618065 0) // Vertex r5b = 8
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6b = 9
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6sb = 10
|
|
||||||
(0.141421356364228 0.141421356110391 0) // Vertex r7b = 11
|
|
||||||
|
|
||||||
(0.5 0 0) // Vertex rb0b = 12
|
|
||||||
(0.353553390910569 -0.353553390275978 0) // Vertex rb1b = 13
|
|
||||||
(8.97448368482705e-10 -0.5 0) // Vertex rb2b = 14
|
|
||||||
(-0.353553389641386 -0.353553391545162 0) // Vertex rb3b = 15
|
|
||||||
(-0.5 1.79489673696541e-09 0) // Vertex rb4b = 16
|
|
||||||
(-0.353553389641386 0.353553391545162 0) // Vertex rb5b = 17
|
|
||||||
(8.97448368482705e-10 0.5 0) // Vertex rb6b = 18
|
|
||||||
(0.353553390910569 0.353553390275978 0) // Vertex rb7b = 19
|
|
||||||
|
|
||||||
(0.6 0 0) // Vertex ri0b = 20
|
|
||||||
(0.424264069092683 -0.424264068331174 0) // Vertex ri1b = 21
|
|
||||||
(1.07693804217925e-09 -0.6 0) // Vertex ri2b = 22
|
|
||||||
(-0.424264067569663 -0.424264069854194 0) // Vertex ri3b = 23
|
|
||||||
(-0.6 2.15387608435849e-09 0) // Vertex ri4b = 24
|
|
||||||
(-0.424264067569663 0.424264069854194 0) // Vertex ri5b = 25
|
|
||||||
(1.07693804217925e-09 0.6 0) // Vertex ri6b = 26
|
|
||||||
(0.424264069092683 0.424264068331174 0) // Vertex ri7b = 27
|
|
||||||
|
|
||||||
(0.7 0 0) // Vertex Rb0b = 28
|
|
||||||
(0.494974747274797 -0.494974746386369 0) // Vertex Rb1b = 29
|
|
||||||
(1.25642771587579e-09 -0.7 0) // Vertex Rb2b = 30
|
|
||||||
(-0.49497474549794 -0.494974748163226 0) // Vertex Rb3b = 31
|
|
||||||
(-0.7 2.51285543175157e-09 0) // Vertex Rb4b = 32
|
|
||||||
(-0.49497474549794 0.494974748163226 0) // Vertex Rb5b = 33
|
|
||||||
(1.25642771587579e-09 0.7 0) // Vertex Rb6b = 34
|
|
||||||
(0.494974747274797 0.494974746386369 0) // Vertex Rb7b = 35
|
|
||||||
|
|
||||||
(1 0 0) // Vertex R0b = 36
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1b = 37
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1sb = 38
|
|
||||||
(1.79489673696541e-09 -1 0) // Vertex R2b = 39
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3b = 40
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3sb = 41
|
|
||||||
(-1 3.58979347393082e-09 0) // Vertex R4b = 42
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5b = 43
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5sb = 44
|
|
||||||
(1.79489673696541e-09 1 0) // Vertex R6b = 45
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7b = 46
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7sb = 47
|
|
||||||
|
|
||||||
(0.2 0 0.1) // Vertex r0t = 48
|
|
||||||
(0.2 0 0.1) // Vertex r0st = 49
|
|
||||||
(0.141421356364228 -0.141421356110391 0.1) // Vertex r1t = 50
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2t = 51
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2st = 52
|
|
||||||
(-0.141421355856554 -0.141421356618065 0.1) // Vertex r3t = 53
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4t = 54
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4st = 55
|
|
||||||
(-0.141421355856554 0.141421356618065 0.1) // Vertex r5t = 56
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6t = 57
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6st = 58
|
|
||||||
(0.141421356364228 0.141421356110391 0.1) // Vertex r7t = 59
|
|
||||||
|
|
||||||
(0.5 0 0.1) // Vertex rb0t = 60
|
|
||||||
(0.353553390910569 -0.353553390275978 0.1) // Vertex rb1t = 61
|
|
||||||
(8.97448368482705e-10 -0.5 0.1) // Vertex rb2t = 62
|
|
||||||
(-0.353553389641386 -0.353553391545162 0.1) // Vertex rb3t = 63
|
|
||||||
(-0.5 1.79489673696541e-09 0.1) // Vertex rb4t = 64
|
|
||||||
(-0.353553389641386 0.353553391545162 0.1) // Vertex rb5t = 65
|
|
||||||
(8.97448368482705e-10 0.5 0.1) // Vertex rb6t = 66
|
|
||||||
(0.353553390910569 0.353553390275978 0.1) // Vertex rb7t = 67
|
|
||||||
|
|
||||||
(0.6 0 0.1) // Vertex ri0t = 68
|
|
||||||
(0.424264069092683 -0.424264068331174 0.1) // Vertex ri1t = 69
|
|
||||||
(1.07693804217925e-09 -0.6 0.1) // Vertex ri2t = 70
|
|
||||||
(-0.424264067569663 -0.424264069854194 0.1) // Vertex ri3t = 71
|
|
||||||
(-0.6 2.15387608435849e-09 0.1) // Vertex ri4t = 72
|
|
||||||
(-0.424264067569663 0.424264069854194 0.1) // Vertex ri5t = 73
|
|
||||||
(1.07693804217925e-09 0.6 0.1) // Vertex ri6t = 74
|
|
||||||
(0.424264069092683 0.424264068331174 0.1) // Vertex ri7t = 75
|
|
||||||
|
|
||||||
(0.7 0 0.1) // Vertex Rb0t = 76
|
|
||||||
(0.494974747274797 -0.494974746386369 0.1) // Vertex Rb1t = 77
|
|
||||||
(1.25642771587579e-09 -0.7 0.1) // Vertex Rb2t = 78
|
|
||||||
(-0.49497474549794 -0.494974748163226 0.1) // Vertex Rb3t = 79
|
|
||||||
(-0.7 2.51285543175157e-09 0.1) // Vertex Rb4t = 80
|
|
||||||
(-0.49497474549794 0.494974748163226 0.1) // Vertex Rb5t = 81
|
|
||||||
(1.25642771587579e-09 0.7 0.1) // Vertex Rb6t = 82
|
|
||||||
(0.494974747274797 0.494974746386369 0.1) // Vertex Rb7t = 83
|
|
||||||
|
|
||||||
(1 0 0.1) // Vertex R0t = 84
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1t = 85
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1st = 86
|
|
||||||
(1.79489673696541e-09 -1 0.1) // Vertex R2t = 87
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3t = 88
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3st = 89
|
|
||||||
(-1 3.58979347393082e-09 0.1) // Vertex R4t = 90
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5t = 91
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5st = 92
|
|
||||||
(1.79489673696541e-09 1 0.1) // Vertex R6t = 93
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7t = 94
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7st = 95
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 2 13 12 48 50 61 60)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (2 4 14 13 50 52 62 61)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (3 5 15 14 51 53 63 62)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (5 7 16 15 53 55 64 63)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (6 8 17 16 54 56 65 64)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (8 10 18 17 56 58 66 65)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (9 11 19 18 57 59 67 66)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (11 1 12 19 59 49 60 67)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (12 13 21 20 60 61 69 68)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (13 14 22 21 61 62 70 69)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (14 15 23 22 62 63 71 70)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (15 16 24 23 63 64 72 71)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (16 17 25 24 64 65 73 72)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (17 18 26 25 65 66 74 73)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (18 19 27 26 66 67 75 74)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (19 12 20 27 67 60 68 75)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (20 21 29 28 68 69 77 76)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (21 22 30 29 69 70 78 77)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (22 23 31 30 70 71 79 78)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (23 24 32 31 71 72 80 79)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (24 25 33 32 72 73 81 80)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (25 26 34 33 73 74 82 81)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (26 27 35 34 74 75 83 82)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (27 20 28 35 75 68 76 83)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (28 29 38 36 76 77 86 84)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (29 30 39 37 77 78 87 85)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (30 31 41 39 78 79 89 87)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (31 32 42 40 79 80 90 88)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (32 33 44 42 80 81 92 90)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (33 34 45 43 81 82 93 91)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (34 35 47 45 82 83 95 93)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (35 28 36 46 83 76 84 94)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
arc 0 2 (0.184775906536601 -0.0765366863901046 0)
|
|
||||||
arc 2 4 (0.0765366867217582 -0.184775906399226 0)
|
|
||||||
arc 3 5 (-0.0765366860584508 -0.184775906673977 0)
|
|
||||||
arc 5 7 (-0.18477590626185 -0.0765366870534118 0)
|
|
||||||
arc 6 8 (-0.18477590626185 0.0765366870534118 0)
|
|
||||||
arc 8 10 (-0.0765366860584508 0.184775906673977 0)
|
|
||||||
arc 9 11 (0.0765366867217582 0.184775906399226 0)
|
|
||||||
arc 11 1 (0.184775906536601 0.0765366863901046 0)
|
|
||||||
|
|
||||||
arc 12 13 (0.461939766341503 -0.191341715975262 0)
|
|
||||||
arc 13 14 (0.191341716804395 -0.461939765998065 0)
|
|
||||||
arc 14 15 (-0.191341715146127 -0.461939766684942 0)
|
|
||||||
arc 15 16 (-0.461939765654626 -0.19134171763353 0)
|
|
||||||
arc 16 17 (-0.461939765654626 0.19134171763353 0)
|
|
||||||
arc 17 18 (-0.191341715146127 0.461939766684942 0)
|
|
||||||
arc 18 19 (0.191341716804395 0.461939765998065 0)
|
|
||||||
arc 19 12 (0.461939766341503 0.191341715975262 0)
|
|
||||||
|
|
||||||
arc 20 21 (0.554327719609804 -0.229610059170314 0)
|
|
||||||
arc 21 22 (0.229610060165275 -0.554327719197677 0)
|
|
||||||
arc 22 23 (-0.229610058175352 -0.55432772002193 0)
|
|
||||||
arc 23 24 (-0.554327718785551 -0.229610061160235 0)
|
|
||||||
arc 24 25 (-0.554327718785551 0.229610061160235 0)
|
|
||||||
arc 25 26 (-0.229610058175352 0.55432772002193 0)
|
|
||||||
arc 26 27 (0.229610060165275 0.554327719197677 0)
|
|
||||||
arc 27 20 (0.554327719609804 0.229610059170314 0)
|
|
||||||
|
|
||||||
arc 28 29 (0.646715672878104 -0.267878402365366 0)
|
|
||||||
arc 29 30 (0.267878403526154 -0.64671567239729 0)
|
|
||||||
arc 30 31 (-0.267878401204578 -0.646715673358918 0)
|
|
||||||
arc 31 32 (-0.646715671916476 -0.267878404686941 0)
|
|
||||||
arc 32 33 (-0.646715671916476 0.267878404686941 0)
|
|
||||||
arc 33 34 (-0.267878401204578 0.646715673358918 0)
|
|
||||||
arc 34 35 (0.267878403526154 0.64671567239729 0)
|
|
||||||
arc 35 28 (0.646715672878104 0.267878402365366 0)
|
|
||||||
|
|
||||||
arc 36 38 (0.923879532683006 -0.382683431950523 0)
|
|
||||||
arc 37 39 (0.382683433608791 -0.923879531996129 0)
|
|
||||||
arc 39 41 (-0.382683430292254 -0.923879533369883 0)
|
|
||||||
arc 40 42 (-0.923879531309252 -0.382683435267059 0)
|
|
||||||
arc 42 44 (-0.923879531309252 0.382683435267059 0)
|
|
||||||
arc 43 45 (-0.382683430292254 0.923879533369883 0)
|
|
||||||
arc 45 47 (0.382683433608791 0.923879531996129 0)
|
|
||||||
arc 46 36 (0.923879532683006 0.382683431950523 0)
|
|
||||||
|
|
||||||
arc 48 50 (0.184775906536601 -0.0765366863901046 0.1)
|
|
||||||
arc 50 52 (0.0765366867217582 -0.184775906399226 0.1)
|
|
||||||
arc 51 53 (-0.0765366860584508 -0.184775906673977 0.1)
|
|
||||||
arc 53 55 (-0.18477590626185 -0.0765366870534118 0.1)
|
|
||||||
arc 54 56 (-0.18477590626185 0.0765366870534118 0.1)
|
|
||||||
arc 56 58 (-0.0765366860584508 0.184775906673977 0.1)
|
|
||||||
arc 57 59 (0.0765366867217582 0.184775906399226 0.1)
|
|
||||||
arc 59 49 (0.184775906536601 0.0765366863901046 0.1)
|
|
||||||
|
|
||||||
arc 60 61 (0.461939766341503 -0.191341715975262 0.1)
|
|
||||||
arc 61 62 (0.191341716804395 -0.461939765998065 0.1)
|
|
||||||
arc 62 63 (-0.191341715146127 -0.461939766684942 0.1)
|
|
||||||
arc 63 64 (-0.461939765654626 -0.19134171763353 0.1)
|
|
||||||
arc 64 65 (-0.461939765654626 0.19134171763353 0.1)
|
|
||||||
arc 65 66 (-0.191341715146127 0.461939766684942 0.1)
|
|
||||||
arc 66 67 (0.191341716804395 0.461939765998065 0.1)
|
|
||||||
arc 67 60 (0.461939766341503 0.191341715975262 0.1)
|
|
||||||
|
|
||||||
arc 68 69 (0.554327719609804 -0.229610059170314 0.1)
|
|
||||||
arc 69 70 (0.229610060165275 -0.554327719197677 0.1)
|
|
||||||
arc 70 71 (-0.229610058175352 -0.55432772002193 0.1)
|
|
||||||
arc 71 72 (-0.554327718785551 -0.229610061160235 0.1)
|
|
||||||
arc 72 73 (-0.554327718785551 0.229610061160235 0.1)
|
|
||||||
arc 73 74 (-0.229610058175352 0.55432772002193 0.1)
|
|
||||||
arc 74 75 (0.229610060165275 0.554327719197677 0.1)
|
|
||||||
arc 75 68 (0.554327719609804 0.229610059170314 0.1)
|
|
||||||
|
|
||||||
arc 76 77 (0.646715672878104 -0.267878402365366 0.1)
|
|
||||||
arc 77 78 (0.267878403526154 -0.64671567239729 0.1)
|
|
||||||
arc 78 79 (-0.267878401204578 -0.646715673358918 0.1)
|
|
||||||
arc 79 80 (-0.646715671916476 -0.267878404686941 0.1)
|
|
||||||
arc 80 81 (-0.646715671916476 0.267878404686941 0.1)
|
|
||||||
arc 81 82 (-0.267878401204578 0.646715673358918 0.1)
|
|
||||||
arc 82 83 (0.267878403526154 0.64671567239729 0.1)
|
|
||||||
arc 83 76 (0.646715672878104 0.267878402365366 0.1)
|
|
||||||
|
|
||||||
arc 84 86 (0.923879532683006 -0.382683431950523 0.1)
|
|
||||||
arc 85 87 (0.382683433608791 -0.923879531996129 0.1)
|
|
||||||
arc 87 89 (-0.382683430292254 -0.923879533369883 0.1)
|
|
||||||
arc 88 90 (-0.923879531309252 -0.382683435267059 0.1)
|
|
||||||
arc 90 92 (-0.923879531309252 0.382683435267059 0.1)
|
|
||||||
arc 91 93 (-0.382683430292254 0.923879533369883 0.1)
|
|
||||||
arc 93 95 (0.382683433608791 0.923879531996129 0.1)
|
|
||||||
arc 94 84 (0.923879532683006 0.382683431950523 0.1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
wall rotor
|
|
||||||
(
|
|
||||||
(0 2 50 48)
|
|
||||||
(2 4 52 50)
|
|
||||||
(3 5 53 51)
|
|
||||||
(5 7 55 53)
|
|
||||||
(6 8 56 54)
|
|
||||||
(8 10 58 56)
|
|
||||||
(9 11 59 57)
|
|
||||||
(11 1 49 59)
|
|
||||||
|
|
||||||
(0 12 60 48)
|
|
||||||
(1 12 60 49)
|
|
||||||
|
|
||||||
(3 14 62 51)
|
|
||||||
(4 14 62 52)
|
|
||||||
|
|
||||||
(6 16 64 54)
|
|
||||||
(7 16 64 55)
|
|
||||||
|
|
||||||
(9 18 66 57)
|
|
||||||
(10 18 66 58)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall stator
|
|
||||||
(
|
|
||||||
(36 38 86 84)
|
|
||||||
(37 39 87 85)
|
|
||||||
(39 41 89 87)
|
|
||||||
(40 42 90 88)
|
|
||||||
(42 44 92 90)
|
|
||||||
(43 45 93 91)
|
|
||||||
(45 47 95 93)
|
|
||||||
(46 36 84 94)
|
|
||||||
|
|
||||||
(37 29 77 85)
|
|
||||||
(38 29 77 86)
|
|
||||||
|
|
||||||
(40 31 79 88)
|
|
||||||
(41 31 79 89)
|
|
||||||
|
|
||||||
(43 33 81 91)
|
|
||||||
(44 33 81 92)
|
|
||||||
|
|
||||||
(46 35 83 94)
|
|
||||||
(47 35 83 95)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty front
|
|
||||||
(
|
|
||||||
(48 50 61 60)
|
|
||||||
(50 52 62 61)
|
|
||||||
(51 53 63 62)
|
|
||||||
(53 55 64 63)
|
|
||||||
(54 56 65 64)
|
|
||||||
(56 58 66 65)
|
|
||||||
(57 59 67 66)
|
|
||||||
(59 49 60 67)
|
|
||||||
(60 61 69 68)
|
|
||||||
(61 62 70 69)
|
|
||||||
(62 63 71 70)
|
|
||||||
(63 64 72 71)
|
|
||||||
(64 65 73 72)
|
|
||||||
(65 66 74 73)
|
|
||||||
(66 67 75 74)
|
|
||||||
(67 60 68 75)
|
|
||||||
(68 69 77 76)
|
|
||||||
(69 70 78 77)
|
|
||||||
(70 71 79 78)
|
|
||||||
(71 72 80 79)
|
|
||||||
(72 73 81 80)
|
|
||||||
(73 74 82 81)
|
|
||||||
(74 75 83 82)
|
|
||||||
(75 68 76 83)
|
|
||||||
(76 77 86 84)
|
|
||||||
(77 78 87 85)
|
|
||||||
(78 79 89 87)
|
|
||||||
(79 80 90 88)
|
|
||||||
(80 81 92 90)
|
|
||||||
(81 82 93 91)
|
|
||||||
(82 83 95 93)
|
|
||||||
(83 76 84 94)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty back
|
|
||||||
(
|
|
||||||
(0 12 13 2)
|
|
||||||
(2 13 14 4)
|
|
||||||
(3 14 15 5)
|
|
||||||
(5 15 16 7)
|
|
||||||
(6 16 17 8)
|
|
||||||
(8 17 18 10)
|
|
||||||
(9 18 19 11)
|
|
||||||
(11 19 12 1)
|
|
||||||
(12 20 21 13)
|
|
||||||
(13 21 22 14)
|
|
||||||
(14 22 23 15)
|
|
||||||
(15 23 24 16)
|
|
||||||
(16 24 25 17)
|
|
||||||
(17 25 26 18)
|
|
||||||
(18 26 27 19)
|
|
||||||
(19 27 20 12)
|
|
||||||
(20 28 29 21)
|
|
||||||
(21 29 30 22)
|
|
||||||
(22 30 31 23)
|
|
||||||
(23 31 32 24)
|
|
||||||
(24 32 33 25)
|
|
||||||
(25 33 34 26)
|
|
||||||
(26 34 35 27)
|
|
||||||
(27 35 28 20)
|
|
||||||
(28 36 38 29)
|
|
||||||
(29 37 39 30)
|
|
||||||
(30 39 41 31)
|
|
||||||
(31 40 42 32)
|
|
||||||
(32 42 44 33)
|
|
||||||
(33 43 45 34)
|
|
||||||
(34 45 47 35)
|
|
||||||
(35 46 36 28)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,818 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General macros to create 2D/extruded-2D meshes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
convertToMeters 0.1;
|
|
||||||
|
|
||||||
// Hub radius
|
|
||||||
|
|
||||||
|
|
||||||
// Impeller-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Baffle-tip radius
|
|
||||||
|
|
||||||
|
|
||||||
// Tank radius
|
|
||||||
|
|
||||||
|
|
||||||
// MRF region radius
|
|
||||||
|
|
||||||
|
|
||||||
// Thickness of 2D slab
|
|
||||||
|
|
||||||
|
|
||||||
// Base z
|
|
||||||
|
|
||||||
|
|
||||||
// Top z
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between hub and impeller tip
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially in each of the two regions between
|
|
||||||
// impeller and baffle tips
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells radially between baffle tip and tank
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells azimuthally in each of the 8 blocks
|
|
||||||
|
|
||||||
|
|
||||||
// Number of cells in the thickness of the slab
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(0.2 0 0) // Vertex r0b = 0
|
|
||||||
(0.2 0 0) // Vertex r0sb = 1
|
|
||||||
(0.141421356364228 -0.141421356110391 0) // Vertex r1b = 2
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2b = 3
|
|
||||||
(3.58979347393082e-10 -0.2 0) // Vertex r2sb = 4
|
|
||||||
(-0.141421355856554 -0.141421356618065 0) // Vertex r3b = 5
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4b = 6
|
|
||||||
(-0.2 7.17958694786164e-10 0) // Vertex r4sb = 7
|
|
||||||
(-0.141421355856554 0.141421356618065 0) // Vertex r5b = 8
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6b = 9
|
|
||||||
(3.58979347393082e-10 0.2 0) // Vertex r6sb = 10
|
|
||||||
(0.141421356364228 0.141421356110391 0) // Vertex r7b = 11
|
|
||||||
|
|
||||||
(0.5 0 0) // Vertex rb0b = 12
|
|
||||||
(0.353553390910569 -0.353553390275978 0) // Vertex rb1b = 13
|
|
||||||
(8.97448368482705e-10 -0.5 0) // Vertex rb2b = 14
|
|
||||||
(-0.353553389641386 -0.353553391545162 0) // Vertex rb3b = 15
|
|
||||||
(-0.5 1.79489673696541e-09 0) // Vertex rb4b = 16
|
|
||||||
(-0.353553389641386 0.353553391545162 0) // Vertex rb5b = 17
|
|
||||||
(8.97448368482705e-10 0.5 0) // Vertex rb6b = 18
|
|
||||||
(0.353553390910569 0.353553390275978 0) // Vertex rb7b = 19
|
|
||||||
|
|
||||||
(0.6 0 0) // Vertex ri0b = 20
|
|
||||||
(0.424264069092683 -0.424264068331174 0) // Vertex ri1b = 21
|
|
||||||
(1.07693804217925e-09 -0.6 0) // Vertex ri2b = 22
|
|
||||||
(-0.424264067569663 -0.424264069854194 0) // Vertex ri3b = 23
|
|
||||||
(-0.6 2.15387608435849e-09 0) // Vertex ri4b = 24
|
|
||||||
(-0.424264067569663 0.424264069854194 0) // Vertex ri5b = 25
|
|
||||||
(1.07693804217925e-09 0.6 0) // Vertex ri6b = 26
|
|
||||||
(0.424264069092683 0.424264068331174 0) // Vertex ri7b = 27
|
|
||||||
|
|
||||||
(0.7 0 0) // Vertex Rb0b = 28
|
|
||||||
(0.494974747274797 -0.494974746386369 0) // Vertex Rb1b = 29
|
|
||||||
(1.25642771587579e-09 -0.7 0) // Vertex Rb2b = 30
|
|
||||||
(-0.49497474549794 -0.494974748163226 0) // Vertex Rb3b = 31
|
|
||||||
(-0.7 2.51285543175157e-09 0) // Vertex Rb4b = 32
|
|
||||||
(-0.49497474549794 0.494974748163226 0) // Vertex Rb5b = 33
|
|
||||||
(1.25642771587579e-09 0.7 0) // Vertex Rb6b = 34
|
|
||||||
(0.494974747274797 0.494974746386369 0) // Vertex Rb7b = 35
|
|
||||||
|
|
||||||
(1 0 0) // Vertex R0b = 36
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1b = 37
|
|
||||||
(0.707106781821139 -0.707106780551956 0) // Vertex R1sb = 38
|
|
||||||
(1.79489673696541e-09 -1 0) // Vertex R2b = 39
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3b = 40
|
|
||||||
(-0.707106779282772 -0.707106783090323 0) // Vertex R3sb = 41
|
|
||||||
(-1 3.58979347393082e-09 0) // Vertex R4b = 42
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5b = 43
|
|
||||||
(-0.707106779282772 0.707106783090323 0) // Vertex R5sb = 44
|
|
||||||
(1.79489673696541e-09 1 0) // Vertex R6b = 45
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7b = 46
|
|
||||||
(0.707106781821139 0.707106780551956 0) // Vertex R7sb = 47
|
|
||||||
|
|
||||||
(0.2 0 0.1) // Vertex r0t = 48
|
|
||||||
(0.2 0 0.1) // Vertex r0st = 49
|
|
||||||
(0.141421356364228 -0.141421356110391 0.1) // Vertex r1t = 50
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2t = 51
|
|
||||||
(3.58979347393082e-10 -0.2 0.1) // Vertex r2st = 52
|
|
||||||
(-0.141421355856554 -0.141421356618065 0.1) // Vertex r3t = 53
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4t = 54
|
|
||||||
(-0.2 7.17958694786164e-10 0.1) // Vertex r4st = 55
|
|
||||||
(-0.141421355856554 0.141421356618065 0.1) // Vertex r5t = 56
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6t = 57
|
|
||||||
(3.58979347393082e-10 0.2 0.1) // Vertex r6st = 58
|
|
||||||
(0.141421356364228 0.141421356110391 0.1) // Vertex r7t = 59
|
|
||||||
|
|
||||||
(0.5 0 0.1) // Vertex rb0t = 60
|
|
||||||
(0.353553390910569 -0.353553390275978 0.1) // Vertex rb1t = 61
|
|
||||||
(8.97448368482705e-10 -0.5 0.1) // Vertex rb2t = 62
|
|
||||||
(-0.353553389641386 -0.353553391545162 0.1) // Vertex rb3t = 63
|
|
||||||
(-0.5 1.79489673696541e-09 0.1) // Vertex rb4t = 64
|
|
||||||
(-0.353553389641386 0.353553391545162 0.1) // Vertex rb5t = 65
|
|
||||||
(8.97448368482705e-10 0.5 0.1) // Vertex rb6t = 66
|
|
||||||
(0.353553390910569 0.353553390275978 0.1) // Vertex rb7t = 67
|
|
||||||
|
|
||||||
(0.6 0 0.1) // Vertex ri0t = 68
|
|
||||||
(0.424264069092683 -0.424264068331174 0.1) // Vertex ri1t = 69
|
|
||||||
(1.07693804217925e-09 -0.6 0.1) // Vertex ri2t = 70
|
|
||||||
(-0.424264067569663 -0.424264069854194 0.1) // Vertex ri3t = 71
|
|
||||||
(-0.6 2.15387608435849e-09 0.1) // Vertex ri4t = 72
|
|
||||||
(-0.424264067569663 0.424264069854194 0.1) // Vertex ri5t = 73
|
|
||||||
(1.07693804217925e-09 0.6 0.1) // Vertex ri6t = 74
|
|
||||||
(0.424264069092683 0.424264068331174 0.1) // Vertex ri7t = 75
|
|
||||||
|
|
||||||
(0.7 0 0.1) // Vertex Rb0t = 76
|
|
||||||
(0.494974747274797 -0.494974746386369 0.1) // Vertex Rb1t = 77
|
|
||||||
(1.25642771587579e-09 -0.7 0.1) // Vertex Rb2t = 78
|
|
||||||
(-0.49497474549794 -0.494974748163226 0.1) // Vertex Rb3t = 79
|
|
||||||
(-0.7 2.51285543175157e-09 0.1) // Vertex Rb4t = 80
|
|
||||||
(-0.49497474549794 0.494974748163226 0.1) // Vertex Rb5t = 81
|
|
||||||
(1.25642771587579e-09 0.7 0.1) // Vertex Rb6t = 82
|
|
||||||
(0.494974747274797 0.494974746386369 0.1) // Vertex Rb7t = 83
|
|
||||||
|
|
||||||
(1 0 0.1) // Vertex R0t = 84
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1t = 85
|
|
||||||
(0.707106781821139 -0.707106780551956 0.1) // Vertex R1st = 86
|
|
||||||
(1.79489673696541e-09 -1 0.1) // Vertex R2t = 87
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3t = 88
|
|
||||||
(-0.707106779282772 -0.707106783090323 0.1) // Vertex R3st = 89
|
|
||||||
(-1 3.58979347393082e-09 0.1) // Vertex R4t = 90
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5t = 91
|
|
||||||
(-0.707106779282772 0.707106783090323 0.1) // Vertex R5st = 92
|
|
||||||
(1.79489673696541e-09 1 0.1) // Vertex R6t = 93
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7t = 94
|
|
||||||
(0.707106781821139 0.707106780551956 0.1) // Vertex R7st = 95
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 2 13 12 48 50 61 60)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (2 4 14 13 50 52 62 61)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (3 5 15 14 51 53 63 62)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (5 7 16 15 53 55 64 63)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (6 8 17 16 54 56 65 64)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (8 10 18 17 56 58 66 65)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (9 11 19 18 57 59 67 66)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (11 1 12 19 59 49 60 67)
|
|
||||||
rotor
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (12 13 21 20 60 61 69 68)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (13 14 22 21 61 62 70 69)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (14 15 23 22 62 63 71 70)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (15 16 24 23 63 64 72 71)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (16 17 25 24 64 65 73 72)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (17 18 26 25 65 66 74 73)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (18 19 27 26 66 67 75 74)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (19 12 20 27 67 60 68 75)
|
|
||||||
rotor
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (20 21 29 28 68 69 77 76)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (21 22 30 29 69 70 78 77)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (22 23 31 30 70 71 79 78)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (23 24 32 31 71 72 80 79)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (24 25 33 32 72 73 81 80)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (25 26 34 33 73 74 82 81)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (26 27 35 34 74 75 83 82)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (27 20 28 35 75 68 76 83)
|
|
||||||
(12 4 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block0
|
|
||||||
hex (28 29 38 36 76 77 86 84)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (29 30 39 37 77 78 87 85)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (30 31 41 39 78 79 89 87)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block3
|
|
||||||
hex (31 32 42 40 79 80 90 88)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block4
|
|
||||||
hex (32 33 44 42 80 81 92 90)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block5
|
|
||||||
hex (33 34 45 43 81 82 93 91)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block6
|
|
||||||
hex (34 35 47 45 82 83 95 93)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block7
|
|
||||||
hex (35 28 36 46 83 76 84 94)
|
|
||||||
(12 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
arc 0 2 (0.184775906536601 -0.0765366863901046 0)
|
|
||||||
arc 2 4 (0.0765366867217582 -0.184775906399226 0)
|
|
||||||
arc 3 5 (-0.0765366860584508 -0.184775906673977 0)
|
|
||||||
arc 5 7 (-0.18477590626185 -0.0765366870534118 0)
|
|
||||||
arc 6 8 (-0.18477590626185 0.0765366870534118 0)
|
|
||||||
arc 8 10 (-0.0765366860584508 0.184775906673977 0)
|
|
||||||
arc 9 11 (0.0765366867217582 0.184775906399226 0)
|
|
||||||
arc 11 1 (0.184775906536601 0.0765366863901046 0)
|
|
||||||
|
|
||||||
arc 12 13 (0.461939766341503 -0.191341715975262 0)
|
|
||||||
arc 13 14 (0.191341716804395 -0.461939765998065 0)
|
|
||||||
arc 14 15 (-0.191341715146127 -0.461939766684942 0)
|
|
||||||
arc 15 16 (-0.461939765654626 -0.19134171763353 0)
|
|
||||||
arc 16 17 (-0.461939765654626 0.19134171763353 0)
|
|
||||||
arc 17 18 (-0.191341715146127 0.461939766684942 0)
|
|
||||||
arc 18 19 (0.191341716804395 0.461939765998065 0)
|
|
||||||
arc 19 12 (0.461939766341503 0.191341715975262 0)
|
|
||||||
|
|
||||||
arc 20 21 (0.554327719609804 -0.229610059170314 0)
|
|
||||||
arc 21 22 (0.229610060165275 -0.554327719197677 0)
|
|
||||||
arc 22 23 (-0.229610058175352 -0.55432772002193 0)
|
|
||||||
arc 23 24 (-0.554327718785551 -0.229610061160235 0)
|
|
||||||
arc 24 25 (-0.554327718785551 0.229610061160235 0)
|
|
||||||
arc 25 26 (-0.229610058175352 0.55432772002193 0)
|
|
||||||
arc 26 27 (0.229610060165275 0.554327719197677 0)
|
|
||||||
arc 27 20 (0.554327719609804 0.229610059170314 0)
|
|
||||||
|
|
||||||
arc 28 29 (0.646715672878104 -0.267878402365366 0)
|
|
||||||
arc 29 30 (0.267878403526154 -0.64671567239729 0)
|
|
||||||
arc 30 31 (-0.267878401204578 -0.646715673358918 0)
|
|
||||||
arc 31 32 (-0.646715671916476 -0.267878404686941 0)
|
|
||||||
arc 32 33 (-0.646715671916476 0.267878404686941 0)
|
|
||||||
arc 33 34 (-0.267878401204578 0.646715673358918 0)
|
|
||||||
arc 34 35 (0.267878403526154 0.64671567239729 0)
|
|
||||||
arc 35 28 (0.646715672878104 0.267878402365366 0)
|
|
||||||
|
|
||||||
arc 36 38 (0.923879532683006 -0.382683431950523 0)
|
|
||||||
arc 37 39 (0.382683433608791 -0.923879531996129 0)
|
|
||||||
arc 39 41 (-0.382683430292254 -0.923879533369883 0)
|
|
||||||
arc 40 42 (-0.923879531309252 -0.382683435267059 0)
|
|
||||||
arc 42 44 (-0.923879531309252 0.382683435267059 0)
|
|
||||||
arc 43 45 (-0.382683430292254 0.923879533369883 0)
|
|
||||||
arc 45 47 (0.382683433608791 0.923879531996129 0)
|
|
||||||
arc 46 36 (0.923879532683006 0.382683431950523 0)
|
|
||||||
|
|
||||||
arc 48 50 (0.184775906536601 -0.0765366863901046 0.1)
|
|
||||||
arc 50 52 (0.0765366867217582 -0.184775906399226 0.1)
|
|
||||||
arc 51 53 (-0.0765366860584508 -0.184775906673977 0.1)
|
|
||||||
arc 53 55 (-0.18477590626185 -0.0765366870534118 0.1)
|
|
||||||
arc 54 56 (-0.18477590626185 0.0765366870534118 0.1)
|
|
||||||
arc 56 58 (-0.0765366860584508 0.184775906673977 0.1)
|
|
||||||
arc 57 59 (0.0765366867217582 0.184775906399226 0.1)
|
|
||||||
arc 59 49 (0.184775906536601 0.0765366863901046 0.1)
|
|
||||||
|
|
||||||
arc 60 61 (0.461939766341503 -0.191341715975262 0.1)
|
|
||||||
arc 61 62 (0.191341716804395 -0.461939765998065 0.1)
|
|
||||||
arc 62 63 (-0.191341715146127 -0.461939766684942 0.1)
|
|
||||||
arc 63 64 (-0.461939765654626 -0.19134171763353 0.1)
|
|
||||||
arc 64 65 (-0.461939765654626 0.19134171763353 0.1)
|
|
||||||
arc 65 66 (-0.191341715146127 0.461939766684942 0.1)
|
|
||||||
arc 66 67 (0.191341716804395 0.461939765998065 0.1)
|
|
||||||
arc 67 60 (0.461939766341503 0.191341715975262 0.1)
|
|
||||||
|
|
||||||
arc 68 69 (0.554327719609804 -0.229610059170314 0.1)
|
|
||||||
arc 69 70 (0.229610060165275 -0.554327719197677 0.1)
|
|
||||||
arc 70 71 (-0.229610058175352 -0.55432772002193 0.1)
|
|
||||||
arc 71 72 (-0.554327718785551 -0.229610061160235 0.1)
|
|
||||||
arc 72 73 (-0.554327718785551 0.229610061160235 0.1)
|
|
||||||
arc 73 74 (-0.229610058175352 0.55432772002193 0.1)
|
|
||||||
arc 74 75 (0.229610060165275 0.554327719197677 0.1)
|
|
||||||
arc 75 68 (0.554327719609804 0.229610059170314 0.1)
|
|
||||||
|
|
||||||
arc 76 77 (0.646715672878104 -0.267878402365366 0.1)
|
|
||||||
arc 77 78 (0.267878403526154 -0.64671567239729 0.1)
|
|
||||||
arc 78 79 (-0.267878401204578 -0.646715673358918 0.1)
|
|
||||||
arc 79 80 (-0.646715671916476 -0.267878404686941 0.1)
|
|
||||||
arc 80 81 (-0.646715671916476 0.267878404686941 0.1)
|
|
||||||
arc 81 82 (-0.267878401204578 0.646715673358918 0.1)
|
|
||||||
arc 82 83 (0.267878403526154 0.64671567239729 0.1)
|
|
||||||
arc 83 76 (0.646715672878104 0.267878402365366 0.1)
|
|
||||||
|
|
||||||
arc 84 86 (0.923879532683006 -0.382683431950523 0.1)
|
|
||||||
arc 85 87 (0.382683433608791 -0.923879531996129 0.1)
|
|
||||||
arc 87 89 (-0.382683430292254 -0.923879533369883 0.1)
|
|
||||||
arc 88 90 (-0.923879531309252 -0.382683435267059 0.1)
|
|
||||||
arc 90 92 (-0.923879531309252 0.382683435267059 0.1)
|
|
||||||
arc 91 93 (-0.382683430292254 0.923879533369883 0.1)
|
|
||||||
arc 93 95 (0.382683433608791 0.923879531996129 0.1)
|
|
||||||
arc 94 84 (0.923879532683006 0.382683431950523 0.1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
wall rotor
|
|
||||||
(
|
|
||||||
(0 2 50 48)
|
|
||||||
(2 4 52 50)
|
|
||||||
(3 5 53 51)
|
|
||||||
(5 7 55 53)
|
|
||||||
(6 8 56 54)
|
|
||||||
(8 10 58 56)
|
|
||||||
(9 11 59 57)
|
|
||||||
(11 1 49 59)
|
|
||||||
|
|
||||||
(0 12 60 48)
|
|
||||||
(1 12 60 49)
|
|
||||||
|
|
||||||
(3 14 62 51)
|
|
||||||
(4 14 62 52)
|
|
||||||
|
|
||||||
(6 16 64 54)
|
|
||||||
(7 16 64 55)
|
|
||||||
|
|
||||||
(9 18 66 57)
|
|
||||||
(10 18 66 58)
|
|
||||||
)
|
|
||||||
|
|
||||||
wall stator
|
|
||||||
(
|
|
||||||
(36 38 86 84)
|
|
||||||
(37 39 87 85)
|
|
||||||
(39 41 89 87)
|
|
||||||
(40 42 90 88)
|
|
||||||
(42 44 92 90)
|
|
||||||
(43 45 93 91)
|
|
||||||
(45 47 95 93)
|
|
||||||
(46 36 84 94)
|
|
||||||
|
|
||||||
(37 29 77 85)
|
|
||||||
(38 29 77 86)
|
|
||||||
|
|
||||||
(40 31 79 88)
|
|
||||||
(41 31 79 89)
|
|
||||||
|
|
||||||
(43 33 81 91)
|
|
||||||
(44 33 81 92)
|
|
||||||
|
|
||||||
(46 35 83 94)
|
|
||||||
(47 35 83 95)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty front
|
|
||||||
(
|
|
||||||
(48 50 61 60)
|
|
||||||
(50 52 62 61)
|
|
||||||
(51 53 63 62)
|
|
||||||
(53 55 64 63)
|
|
||||||
(54 56 65 64)
|
|
||||||
(56 58 66 65)
|
|
||||||
(57 59 67 66)
|
|
||||||
(59 49 60 67)
|
|
||||||
(60 61 69 68)
|
|
||||||
(61 62 70 69)
|
|
||||||
(62 63 71 70)
|
|
||||||
(63 64 72 71)
|
|
||||||
(64 65 73 72)
|
|
||||||
(65 66 74 73)
|
|
||||||
(66 67 75 74)
|
|
||||||
(67 60 68 75)
|
|
||||||
(68 69 77 76)
|
|
||||||
(69 70 78 77)
|
|
||||||
(70 71 79 78)
|
|
||||||
(71 72 80 79)
|
|
||||||
(72 73 81 80)
|
|
||||||
(73 74 82 81)
|
|
||||||
(74 75 83 82)
|
|
||||||
(75 68 76 83)
|
|
||||||
(76 77 86 84)
|
|
||||||
(77 78 87 85)
|
|
||||||
(78 79 89 87)
|
|
||||||
(79 80 90 88)
|
|
||||||
(80 81 92 90)
|
|
||||||
(81 82 93 91)
|
|
||||||
(82 83 95 93)
|
|
||||||
(83 76 84 94)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty back
|
|
||||||
(
|
|
||||||
(0 12 13 2)
|
|
||||||
(2 13 14 4)
|
|
||||||
(3 14 15 5)
|
|
||||||
(5 15 16 7)
|
|
||||||
(6 16 17 8)
|
|
||||||
(8 17 18 10)
|
|
||||||
(9 18 19 11)
|
|
||||||
(11 19 12 1)
|
|
||||||
(12 20 21 13)
|
|
||||||
(13 21 22 14)
|
|
||||||
(14 22 23 15)
|
|
||||||
(15 23 24 16)
|
|
||||||
(16 24 25 17)
|
|
||||||
(17 25 26 18)
|
|
||||||
(18 26 27 19)
|
|
||||||
(19 27 20 12)
|
|
||||||
(20 28 29 21)
|
|
||||||
(21 29 30 22)
|
|
||||||
(22 30 31 23)
|
|
||||||
(23 31 32 24)
|
|
||||||
(24 32 33 25)
|
|
||||||
(25 33 34 26)
|
|
||||||
(26 34 35 27)
|
|
||||||
(27 35 28 20)
|
|
||||||
(28 36 38 29)
|
|
||||||
(29 37 39 30)
|
|
||||||
(30 39 41 31)
|
|
||||||
(31 40 42 32)
|
|
||||||
(32 42 44 33)
|
|
||||||
(33 43 45 34)
|
|
||||||
(34 45 47 35)
|
|
||||||
(35 46 36 28)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -21,25 +21,25 @@ FoamFile
|
|||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 51;
|
nFaces 51;
|
||||||
startFace 15151;
|
startFace 57362;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 51;
|
nFaces 51;
|
||||||
startFace 15202;
|
startFace 57413;
|
||||||
}
|
}
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 436;
|
nFaces 836;
|
||||||
startFace 15253;
|
startFace 57464;
|
||||||
}
|
}
|
||||||
frontBack
|
frontBack
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
nFaces 15420;
|
nFaces 57540;
|
||||||
startFace 15689;
|
startFace 58300;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,143 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General m4 macros
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// User-defined parameters
|
|
||||||
|
|
||||||
convertToMeters 1;
|
|
||||||
|
|
||||||
// Length of tank (x-direction)
|
|
||||||
// Breadth of tank (y-direction)
|
|
||||||
// Depth of tank (z-direction)
|
|
||||||
|
|
||||||
// Depth to the top (height) of lower chamfer
|
|
||||||
// Height of upper chamfer
|
|
||||||
|
|
||||||
// Angle of lower chamfer to the horizontal
|
|
||||||
// Angle of upper chamfer to the horizontal
|
|
||||||
|
|
||||||
// Centre of gravity in y-direction
|
|
||||||
// Centre of gravity in z-direction
|
|
||||||
|
|
||||||
// Number of cells in the length (1 for 2D)
|
|
||||||
// Number of cells in the breadth
|
|
||||||
// Number of cells in the height of the lower champfer
|
|
||||||
// Number of cells in the height between the chamfers
|
|
||||||
// Number of cells in the height of the upper champfer
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Derived parameters
|
|
||||||
|
|
||||||
// Breadth to the top (height) of lower chamfer
|
|
||||||
// Breadth of upper chamfer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Parametric description
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(-0.5 -15 -10.0) // Vertex bllcb = 0
|
|
||||||
(-0.5 -20 -5) // Vertex bllc = 1
|
|
||||||
(-0.5 -20 10) // Vertex bluc = 2
|
|
||||||
(-0.5 -10 20) // Vertex bluct = 3
|
|
||||||
(-0.5 15 -10.0) // Vertex brlcb = 4
|
|
||||||
(-0.5 20 -5) // Vertex brlc = 5
|
|
||||||
(-0.5 20 10) // Vertex bruc = 6
|
|
||||||
(-0.5 10 20) // Vertex bruct = 7
|
|
||||||
|
|
||||||
(0.5 -15 -10.0) // Vertex fllcb = 8
|
|
||||||
(0.5 -20 -5) // Vertex fllc = 9
|
|
||||||
(0.5 -20 10) // Vertex fluc = 10
|
|
||||||
(0.5 -10 20) // Vertex fluct = 11
|
|
||||||
(0.5 15 -10.0) // Vertex frlcb = 12
|
|
||||||
(0.5 20 -5) // Vertex frlc = 13
|
|
||||||
(0.5 20 10) // Vertex fruc = 14
|
|
||||||
(0.5 10 20) // Vertex fruct = 15
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 4 5 1 8 12 13 9)
|
|
||||||
(40 6 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (1 5 6 2 9 13 14 10)
|
|
||||||
(40 16 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (2 6 7 3 10 14 15 11)
|
|
||||||
(40 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
patch walls
|
|
||||||
(
|
|
||||||
(0 4 12 8)
|
|
||||||
(4 5 13 12)
|
|
||||||
(5 6 14 13)
|
|
||||||
(6 7 15 14)
|
|
||||||
(7 3 11 15)
|
|
||||||
(3 2 10 11)
|
|
||||||
(2 1 9 10)
|
|
||||||
(1 0 8 9)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty front
|
|
||||||
(
|
|
||||||
(8 12 13 9)
|
|
||||||
(9 13 14 10)
|
|
||||||
(10 14 15 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty back
|
|
||||||
(
|
|
||||||
(0 1 5 4)
|
|
||||||
(1 2 6 5)
|
|
||||||
(2 3 7 6)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,143 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General m4 macros
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// User-defined parameters
|
|
||||||
|
|
||||||
convertToMeters 1;
|
|
||||||
|
|
||||||
// Length of tank (x-direction)
|
|
||||||
// Breadth of tank (y-direction)
|
|
||||||
// Depth of tank (z-direction)
|
|
||||||
|
|
||||||
// Depth to the top (height) of lower chamfer
|
|
||||||
// Height of upper chamfer
|
|
||||||
|
|
||||||
// Angle of lower chamfer to the horizontal
|
|
||||||
// Angle of upper chamfer to the horizontal
|
|
||||||
|
|
||||||
// Centre of gravity in y-direction
|
|
||||||
// Centre of gravity in z-direction
|
|
||||||
|
|
||||||
// Number of cells in the length (1 for 2D)
|
|
||||||
// Number of cells in the breadth
|
|
||||||
// Number of cells in the height of the lower champfer
|
|
||||||
// Number of cells in the height between the chamfers
|
|
||||||
// Number of cells in the height of the upper champfer
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Derived parameters
|
|
||||||
|
|
||||||
// Breadth to the top (height) of lower chamfer
|
|
||||||
// Breadth of upper chamfer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Parametric description
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(-0.5 -15 -10.0) // Vertex bllcb = 0
|
|
||||||
(-0.5 -20 -5) // Vertex bllc = 1
|
|
||||||
(-0.5 -20 10) // Vertex bluc = 2
|
|
||||||
(-0.5 -10 20) // Vertex bluct = 3
|
|
||||||
(-0.5 15 -10.0) // Vertex brlcb = 4
|
|
||||||
(-0.5 20 -5) // Vertex brlc = 5
|
|
||||||
(-0.5 20 10) // Vertex bruc = 6
|
|
||||||
(-0.5 10 20) // Vertex bruct = 7
|
|
||||||
|
|
||||||
(0.5 -15 -10.0) // Vertex fllcb = 8
|
|
||||||
(0.5 -20 -5) // Vertex fllc = 9
|
|
||||||
(0.5 -20 10) // Vertex fluc = 10
|
|
||||||
(0.5 -10 20) // Vertex fluct = 11
|
|
||||||
(0.5 15 -10.0) // Vertex frlcb = 12
|
|
||||||
(0.5 20 -5) // Vertex frlc = 13
|
|
||||||
(0.5 20 10) // Vertex fruc = 14
|
|
||||||
(0.5 10 20) // Vertex fruct = 15
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 4 5 1 8 12 13 9)
|
|
||||||
(40 6 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (1 5 6 2 9 13 14 10)
|
|
||||||
(40 16 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (2 6 7 3 10 14 15 11)
|
|
||||||
(40 12 1)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
patch walls
|
|
||||||
(
|
|
||||||
(0 4 12 8)
|
|
||||||
(4 5 13 12)
|
|
||||||
(5 6 14 13)
|
|
||||||
(6 7 15 14)
|
|
||||||
(7 3 11 15)
|
|
||||||
(3 2 10 11)
|
|
||||||
(2 1 9 10)
|
|
||||||
(1 0 8 9)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty front
|
|
||||||
(
|
|
||||||
(8 12 13 9)
|
|
||||||
(9 13 14 10)
|
|
||||||
(10 14 15 11)
|
|
||||||
)
|
|
||||||
|
|
||||||
empty back
|
|
||||||
(
|
|
||||||
(0 1 5 4)
|
|
||||||
(1 2 6 5)
|
|
||||||
(2 3 7 6)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General m4 macros
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// User-defined parameters
|
|
||||||
|
|
||||||
convertToMeters 1;
|
|
||||||
|
|
||||||
// Length of tank (x-direction)
|
|
||||||
// Breadth of tank (y-direction)
|
|
||||||
// Depth of tank (z-direction)
|
|
||||||
|
|
||||||
// Depth to the top (height) of lower chamfer
|
|
||||||
// Height of upper chamfer
|
|
||||||
|
|
||||||
// Angle of lower chamfer to the horizontal
|
|
||||||
// Angle of upper chamfer to the horizontal
|
|
||||||
|
|
||||||
// Centre of gravity in y-direction
|
|
||||||
// Centre of gravity in z-direction
|
|
||||||
|
|
||||||
// Number of cells in the length (1 for 2D)
|
|
||||||
// Number of cells in the breadth
|
|
||||||
// Number of cells in the height of the lower champfer
|
|
||||||
// Number of cells in the height between the chamfers
|
|
||||||
// Number of cells in the height of the upper champfer
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Derived parameters
|
|
||||||
|
|
||||||
// Breadth to the top (height) of lower chamfer
|
|
||||||
// Breadth of upper chamfer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Parametric description
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(-10 -15 -10.0) // Vertex bllcb = 0
|
|
||||||
(-10 -20 -5) // Vertex bllc = 1
|
|
||||||
(-10 -20 10) // Vertex bluc = 2
|
|
||||||
(-10 -10 20) // Vertex bluct = 3
|
|
||||||
(-10 15 -10.0) // Vertex brlcb = 4
|
|
||||||
(-10 20 -5) // Vertex brlc = 5
|
|
||||||
(-10 20 10) // Vertex bruc = 6
|
|
||||||
(-10 10 20) // Vertex bruct = 7
|
|
||||||
|
|
||||||
(10 -15 -10.0) // Vertex fllcb = 8
|
|
||||||
(10 -20 -5) // Vertex fllc = 9
|
|
||||||
(10 -20 10) // Vertex fluc = 10
|
|
||||||
(10 -10 20) // Vertex fluct = 11
|
|
||||||
(10 15 -10.0) // Vertex frlcb = 12
|
|
||||||
(10 20 -5) // Vertex frlc = 13
|
|
||||||
(10 20 10) // Vertex fruc = 14
|
|
||||||
(10 10 20) // Vertex fruct = 15
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 4 5 1 8 12 13 9)
|
|
||||||
(40 6 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (1 5 6 2 9 13 14 10)
|
|
||||||
(40 16 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (2 6 7 3 10 14 15 11)
|
|
||||||
(40 12 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
patch walls
|
|
||||||
(
|
|
||||||
(0 4 12 8)
|
|
||||||
(4 5 13 12)
|
|
||||||
(5 6 14 13)
|
|
||||||
(6 7 15 14)
|
|
||||||
(7 3 11 15)
|
|
||||||
(3 2 10 11)
|
|
||||||
(2 1 9 10)
|
|
||||||
(1 0 8 9)
|
|
||||||
(8 12 13 9)
|
|
||||||
(9 13 14 10)
|
|
||||||
(10 14 15 11)
|
|
||||||
(0 1 5 4)
|
|
||||||
(1 2 6 5)
|
|
||||||
(2 3 7 6)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General m4 macros
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// User-defined parameters
|
|
||||||
|
|
||||||
convertToMeters 1;
|
|
||||||
|
|
||||||
// Length of tank (x-direction)
|
|
||||||
// Breadth of tank (y-direction)
|
|
||||||
// Depth of tank (z-direction)
|
|
||||||
|
|
||||||
// Depth to the top (height) of lower chamfer
|
|
||||||
// Height of upper chamfer
|
|
||||||
|
|
||||||
// Angle of lower chamfer to the horizontal
|
|
||||||
// Angle of upper chamfer to the horizontal
|
|
||||||
|
|
||||||
// Centre of gravity in y-direction
|
|
||||||
// Centre of gravity in z-direction
|
|
||||||
|
|
||||||
// Number of cells in the length (1 for 2D)
|
|
||||||
// Number of cells in the breadth
|
|
||||||
// Number of cells in the height of the lower champfer
|
|
||||||
// Number of cells in the height between the chamfers
|
|
||||||
// Number of cells in the height of the upper champfer
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Derived parameters
|
|
||||||
|
|
||||||
// Breadth to the top (height) of lower chamfer
|
|
||||||
// Breadth of upper chamfer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Parametric description
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(-10 -15 -10.0) // Vertex bllcb = 0
|
|
||||||
(-10 -20 -5) // Vertex bllc = 1
|
|
||||||
(-10 -20 10) // Vertex bluc = 2
|
|
||||||
(-10 -10 20) // Vertex bluct = 3
|
|
||||||
(-10 15 -10.0) // Vertex brlcb = 4
|
|
||||||
(-10 20 -5) // Vertex brlc = 5
|
|
||||||
(-10 20 10) // Vertex bruc = 6
|
|
||||||
(-10 10 20) // Vertex bruct = 7
|
|
||||||
|
|
||||||
(10 -15 -10.0) // Vertex fllcb = 8
|
|
||||||
(10 -20 -5) // Vertex fllc = 9
|
|
||||||
(10 -20 10) // Vertex fluc = 10
|
|
||||||
(10 -10 20) // Vertex fluct = 11
|
|
||||||
(10 15 -10.0) // Vertex frlcb = 12
|
|
||||||
(10 20 -5) // Vertex frlc = 13
|
|
||||||
(10 20 10) // Vertex fruc = 14
|
|
||||||
(10 10 20) // Vertex fruct = 15
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 4 5 1 8 12 13 9)
|
|
||||||
(40 6 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (1 5 6 2 9 13 14 10)
|
|
||||||
(40 16 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (2 6 7 3 10 14 15 11)
|
|
||||||
(40 12 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
patch walls
|
|
||||||
(
|
|
||||||
(0 4 12 8)
|
|
||||||
(4 5 13 12)
|
|
||||||
(5 6 14 13)
|
|
||||||
(6 7 15 14)
|
|
||||||
(7 3 11 15)
|
|
||||||
(3 2 10 11)
|
|
||||||
(2 1 9 10)
|
|
||||||
(1 0 8 9)
|
|
||||||
(8 12 13 9)
|
|
||||||
(9 13 14 10)
|
|
||||||
(10 14 15 11)
|
|
||||||
(0 1 5 4)
|
|
||||||
(1 2 6 5)
|
|
||||||
(2 3 7 6)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object blockMeshDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// General m4 macros
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// User-defined parameters
|
|
||||||
|
|
||||||
convertToMeters 1;
|
|
||||||
|
|
||||||
// Length of tank (x-direction)
|
|
||||||
// Breadth of tank (y-direction)
|
|
||||||
// Depth of tank (z-direction)
|
|
||||||
|
|
||||||
// Depth to the top (height) of lower chamfer
|
|
||||||
// Height of upper chamfer
|
|
||||||
|
|
||||||
// Angle of lower chamfer to the horizontal
|
|
||||||
// Angle of upper chamfer to the horizontal
|
|
||||||
|
|
||||||
// Centre of gravity in y-direction
|
|
||||||
// Centre of gravity in z-direction
|
|
||||||
|
|
||||||
// Number of cells in the length (1 for 2D)
|
|
||||||
// Number of cells in the breadth
|
|
||||||
// Number of cells in the height of the lower champfer
|
|
||||||
// Number of cells in the height between the chamfers
|
|
||||||
// Number of cells in the height of the upper champfer
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Derived parameters
|
|
||||||
|
|
||||||
// Breadth to the top (height) of lower chamfer
|
|
||||||
// Breadth of upper chamfer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
// Parametric description
|
|
||||||
|
|
||||||
vertices
|
|
||||||
(
|
|
||||||
(-10 -15 -10.0) // Vertex bllcb = 0
|
|
||||||
(-10 -20 -5) // Vertex bllc = 1
|
|
||||||
(-10 -20 10) // Vertex bluc = 2
|
|
||||||
(-10 -10 20) // Vertex bluct = 3
|
|
||||||
(-10 15 -10.0) // Vertex brlcb = 4
|
|
||||||
(-10 20 -5) // Vertex brlc = 5
|
|
||||||
(-10 20 10) // Vertex bruc = 6
|
|
||||||
(-10 10 20) // Vertex bruct = 7
|
|
||||||
|
|
||||||
(10 -15 -10.0) // Vertex fllcb = 8
|
|
||||||
(10 -20 -5) // Vertex fllc = 9
|
|
||||||
(10 -20 10) // Vertex fluc = 10
|
|
||||||
(10 -10 20) // Vertex fluct = 11
|
|
||||||
(10 15 -10.0) // Vertex frlcb = 12
|
|
||||||
(10 20 -5) // Vertex frlc = 13
|
|
||||||
(10 20 10) // Vertex fruc = 14
|
|
||||||
(10 10 20) // Vertex fruct = 15
|
|
||||||
);
|
|
||||||
|
|
||||||
blocks
|
|
||||||
(
|
|
||||||
// block0
|
|
||||||
hex (0 4 5 1 8 12 13 9)
|
|
||||||
(40 6 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block1
|
|
||||||
hex (1 5 6 2 9 13 14 10)
|
|
||||||
(40 16 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
|
|
||||||
// block2
|
|
||||||
hex (2 6 7 3 10 14 15 11)
|
|
||||||
(40 12 19)
|
|
||||||
simpleGrading (1 1 1)
|
|
||||||
);
|
|
||||||
|
|
||||||
patches
|
|
||||||
(
|
|
||||||
patch walls
|
|
||||||
(
|
|
||||||
(0 4 12 8)
|
|
||||||
(4 5 13 12)
|
|
||||||
(5 6 14 13)
|
|
||||||
(6 7 15 14)
|
|
||||||
(7 3 11 15)
|
|
||||||
(3 2 10 11)
|
|
||||||
(2 1 9 10)
|
|
||||||
(1 0 8 9)
|
|
||||||
(8 12 13 9)
|
|
||||||
(9 13 14 10)
|
|
||||||
(10 14 15 11)
|
|
||||||
(0 1 5 4)
|
|
||||||
(1 2 6 5)
|
|
||||||
(2 3 7 6)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
foamCleanTutorials cases
|
# Source tutorial clean functions
|
||||||
rm -rf 0/alpha1.gz
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf 0/alpha1
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
rm system/topoSetDict > /dev/null 2>&1
|
||||||
cp constant/polyMesh/boundary.org constant/polyMesh/boundary
|
cp constant/polyMesh/boundary.org constant/polyMesh/boundary
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -38,7 +38,7 @@ FoamFile
|
|||||||
bullet
|
bullet
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 56218;
|
nFaces 37896;
|
||||||
startFace 1133431;
|
startFace 1133431;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user