mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
Periodic boundary condition implementation
- boundaryBase class, some methods has been added, index list on host added, boundaryList friended - generalBoundary class is created for all boundary types - searchBoundary class is created for contact search -> (regular, none), - pointStructure can be accessed through contactSearch to be done: - A new class for periodic boundary condtion should be added. This class should handel pp and pw contact searchs. - Messages should be rearranged for boundaries. - Events and updates should be synced, so that the same contact list can be used for internal particles and boundary particles.
This commit is contained in:
36
src/Interaction/contactSearch/boundaries/searchBoundary.cpp
Normal file
36
src/Interaction/contactSearch/boundaries/searchBoundary.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
|
||||
#include "searchBoundary.hpp"
|
||||
#include "contactSearch.hpp"
|
||||
|
||||
|
||||
pFlow::searchBoundary::searchBoundary
|
||||
(
|
||||
const dictionary& dict,
|
||||
const boundaryBase& boundary,
|
||||
const contactSearch& cSearch
|
||||
)
|
||||
:
|
||||
generalBoundary
|
||||
(
|
||||
boundary,
|
||||
cSearch.pStruct(),
|
||||
"",
|
||||
""
|
||||
),
|
||||
contactSearch_(cSearch),
|
||||
updateInterval_(dict.getVal<uint32>("updateInterval"))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
pFlow::uniquePtr<pFlow::searchBoundary>
|
||||
pFlow::searchBoundary::create
|
||||
(
|
||||
const dictionary &dict,
|
||||
const boundaryBase &boundary,
|
||||
const contactSearch &cSearch
|
||||
)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
113
src/Interaction/contactSearch/boundaries/searchBoundary.hpp
Normal file
113
src/Interaction/contactSearch/boundaries/searchBoundary.hpp
Normal file
@ -0,0 +1,113 @@
|
||||
/*------------------------------- phasicFlow ---------------------------------
|
||||
O C enter of
|
||||
O O E ngineering and
|
||||
O O M ultiscale modeling of
|
||||
OOOOOOO F luid flow
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C): www.cemf.ir
|
||||
email: hamid.r.norouzi AT gmail.com
|
||||
------------------------------------------------------------------------------
|
||||
Licence:
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
granular and multiphase flows. You can redistribute it and/or modify it under
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
#ifndef __searchBoundary_hpp__
|
||||
#define __searchBoundary_hpp__
|
||||
|
||||
|
||||
#include "generalBoundary.hpp"
|
||||
#include "virtualConstructor.hpp"
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
|
||||
class contactSearch;
|
||||
|
||||
class searchBoundary
|
||||
:
|
||||
public generalBoundary
|
||||
{
|
||||
private:
|
||||
|
||||
const contactSearch& contactSearch_;
|
||||
|
||||
/// @brief update interval in terms of iteration numebr
|
||||
uint32 updateInterval_;
|
||||
|
||||
/// @brief last iteration number which contact search has been performed
|
||||
uint32 lastUpdated_ = 0;
|
||||
|
||||
/// @brief performed search?
|
||||
bool performedSearch_ = false;
|
||||
|
||||
public:
|
||||
|
||||
// type info
|
||||
TypeInfo("searchBoundary<regular,none>");
|
||||
|
||||
|
||||
searchBoundary(
|
||||
const dictionary& dict,
|
||||
const boundaryBase& boundary,
|
||||
const contactSearch& cSearch);
|
||||
|
||||
create_vCtor
|
||||
(
|
||||
searchBoundary,
|
||||
boundaryBase,
|
||||
(
|
||||
const dictionary& dict,
|
||||
const boundaryBase& boundary,
|
||||
const contactSearch& cSearch
|
||||
),
|
||||
(dict, boundary, cSearch)
|
||||
);
|
||||
|
||||
add_vCtor
|
||||
(
|
||||
searchBoundary,
|
||||
searchBoundary,
|
||||
boundaryBase
|
||||
);
|
||||
|
||||
|
||||
void fill(const std::any& val)override
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool hearChanges
|
||||
(
|
||||
real t,
|
||||
real dt,
|
||||
uint32 iter,
|
||||
const message& msg,
|
||||
const anyList& varList
|
||||
) override
|
||||
{
|
||||
|
||||
if(msg.equivalentTo(message::BNDR_RESET))
|
||||
{
|
||||
//do nothing
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
uniquePtr<searchBoundary> create(
|
||||
const dictionary& dict,
|
||||
const boundaryBase& boundary,
|
||||
const contactSearch& cSearch);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //__searchBoundary_hpp__
|
||||
|
@ -20,6 +20,7 @@ Licence:
|
||||
|
||||
#include "contactSearch.hpp"
|
||||
#include "streams.hpp"
|
||||
#include "particles.hpp"
|
||||
|
||||
|
||||
pFlow::contactSearch::contactSearch(
|
||||
@ -39,13 +40,17 @@ pFlow::contactSearch::contactSearch(
|
||||
|
||||
}
|
||||
|
||||
const pFlow::pointStructure &pFlow::contactSearch::pStruct() const
|
||||
{
|
||||
return particles_.pStruct();
|
||||
}
|
||||
|
||||
pFlow::uniquePtr<pFlow::contactSearch> pFlow::contactSearch::create(
|
||||
const dictionary& dict,
|
||||
const box& domain,
|
||||
const particles& prtcl,
|
||||
const geometry& geom,
|
||||
Timers& timers)
|
||||
const dictionary &dict,
|
||||
const box &domain,
|
||||
const particles &prtcl,
|
||||
const geometry &geom,
|
||||
Timers &timers)
|
||||
{
|
||||
word baseMethName = dict.getVal<word>("method");
|
||||
|
||||
|
@ -35,6 +35,7 @@ namespace pFlow
|
||||
class box;
|
||||
class particles;
|
||||
class geometry;
|
||||
class pointStructure;
|
||||
|
||||
|
||||
class contactSearch
|
||||
@ -97,6 +98,8 @@ public:
|
||||
return particles_;
|
||||
}
|
||||
|
||||
const pointStructure& pStruct()const;
|
||||
|
||||
const auto& Geometry()const
|
||||
{
|
||||
return geometry_;
|
||||
|
Reference in New Issue
Block a user