| 1 |
/************************************************************************* |
| 2 |
* Copyright (C) 2009-2012 by Franck Lominé * |
| 3 |
* [email protected] * |
| 4 |
* * |
| 5 |
* This program is free software; it is licensed under the terms of the * |
| 6 |
* GNU General Public License v2 or later. See file LICENSE for details. * |
| 7 |
* * |
| 8 |
*************************************************************************/ |
| 9 |
#ifdef LBM_ENGINE |
| 10 |
|
| 11 |
#pragma once |
| 12 |
#include <lib/multimethods/Indexable.hpp> |
| 13 |
#include <lib/serialization/Serializable.hpp> |
| 14 |
|
| 15 |
namespace yade { // Cannot have #include directive inside. |
| 16 |
|
| 17 |
class LBMlink : public Serializable { |
| 18 |
public: |
| 19 |
void ReinitDynamicalProperties() |
| 20 |
{ |
| 21 |
sid = -1; |
| 22 |
fid = -1; |
| 23 |
idx_sigma_i = -1; |
| 24 |
isBd = false; |
| 25 |
VbMid = Vector3r::Zero(); |
| 26 |
DistMid = Vector3r::Zero(); |
| 27 |
ct = 0.; |
| 28 |
return; |
| 29 |
}; |
| 30 |
virtual ~LBMlink() {}; |
| 31 |
|
| 32 |
// clang-format off |
| 33 |
YADE_CLASS_BASE_DOC_ATTRS_CTOR(LBMlink,Serializable, |
| 34 |
"Link class for Lattice Boltzmann Method ", |
| 35 |
((int,sid,-1,,"Solid node identifier ")) |
| 36 |
((int,fid,-1,,"Fluid node identifier ")) |
| 37 |
((short int,i,-1,,"direction index of the link")) |
| 38 |
((int,nid1,-1,,"fixed node identifier")) |
| 39 |
((int,nid2,-1,,"fixed node identifier or -1 if node points outside")) |
| 40 |
((short int,idx_sigma_i,-1,,"sigma_i direction index (Fluid->Solid)")) |
| 41 |
((bool,isBd,false,,"True if it is a boundary link")) |
| 42 |
((bool,PointingOutside,false,,"True if it is a link pointing outside to the system (from a fluid or solid node)")) |
| 43 |
((Vector3r,VbMid,Vector3r::Zero(),,"Velocity of boundary at midpoint")) |
| 44 |
((Vector3r,DistMid,Vector3r::Zero(),,"Distance between middle of the link and mass center of body")) |
| 45 |
((Real,ct,0.,,"Coupling term in modified bounce back rule")), |
| 46 |
); |
| 47 |
// clang-format on |
| 48 |
}; |
| 49 |
REGISTER_SERIALIZABLE(LBMlink); |
| 50 |
|
| 51 |
} // namespace yade |
| 52 |
|
| 53 |
#endif //LBM_ENGINE |