albert.mink
Forum Replies Created
-
AuthorPosts
-
albert.minkModerator
Hi
the geometry definition in venturi3d has been moved to the xml file.
There you have the IndicatorUnion3D which means basically + (the logical OR)
IndicatorWithout3D (-) and IndicatorIntersection3D (the logical AND) are also available.The detailed implementation is found at the bottowm of
src/functors/analytical/indicator/indicatorF3D.hhAll the best
Albert////////////
Alt.
You may still work without the XML file. But note that the Indicators are now required to be std::shared_ptr<IndicatorCuboid3D<….>>
E.g.auto cuboid1 = std::make_shared<IndicatorCuboid3D<double>>(constructor parameters); auto cuboid2 = std::make_shared<IndicatorCuboid3D<double>>(constructor parameters); IndicatorIdentity3D<T> Fluid(cuboid1-cuboid2);
albert.minkModeratorYou are welcome to contribute to openLB. So you might provide an efficiency evaluation and compare the time consumed with and without.
albert.minkModeratorHi Laurent,
we appreciate all recommendations to make the software better.
Would you mind to tell my what is the problem with line 359? Does is result in false rename or is it an efficiency issue?
All the best
Albertalbert.minkModeratorDear Laurent,
whether something is colored blue, red or whatever depends probably on your post-processing software and is not directly related to OpenLB.
I suppose that by “blue” you mean material number 1. The design of OpenLB strictly requires material number of 1 for fluid cells and other for boundaries. That means you better DO NOT change your material number in OpenLB, but adjust your color mapping to get ‘your color’ in your post-processing software.Cheers
Albertalbert.minkModeratorHi Bujji
please have a look to
example/cavity2d/parallelin particular function
getResultsFor details on that you should investigate the data structure of OpenLB.
albert.minkModeratorHi Buji
<particularCell>.computeRho()
does the job.
You also might search in src/ folder the word <density>Kind regards
Albertalbert.minkModeratorI do not get the idea behind it.
I had a brief look on the IndicatorLayer3D implementation and it returns true for a given lattice point, if this point is inside a layer. The latter is defined by an indicator passed by the constructor to IndicatorLayer3D.
If you want a Layer around an indicator, then pass your what-ever-indicator to the constructor of the IndicatorLayer3D. Saying that, first construct your indicators via +,-,* and then use IndicatorLayer3D.
albert.minkModeratorQuote:Quote from LaurentDelaon on July 2, 2018, 18:51
with stl file how do I realise indicator of object in stl file ?I cannot attach my stl files with the message…
For geometry creation with STL files, see example/cylinder3d.
albert.minkModeratorHi Buji
nan usually means that simulation diverged. To get an idea of why the simulation is broken it is helpful to write simulation right before the crash and have a look.
For implementation details, see doxygen
http://optilb.com/DoxyGen/html/index.htmlCheers
Albertalbert.minkModeratorHi Eric,
did you tried to call
sLattice.iniEquilibrium( superGeometry, 1, rhoF, uF )
with uF different to zero?First the array is initialized by zeros.
Then it gets the value from the passed AnalyticalF2D object.Code:T uTmp[] = {T(),T()};
u(uTmp,physR);So just try it.
All the best
Albertalbert.minkModeratorI know that OpenLB has a fringe zone implementation. I wonder whether you have implemented by your own, since I can not find the code you showed me in any file.
albert.minkModeratorYep. Strange code interface in forum.
Code:template<typename T, template<typename U> class Lattice>
SlipBoundaryProcessor3D<T,Lattice>::
SlipBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int discreteNormalX, int discreteNormalY, int discreteNormalZ)
: x0(x0_), x1(x1_), y0(y0_), y1(y1_), z0(z0_), z1(z1_)
{
OLB_PRECONDITION(x0==x1 || y0==y1 || z0==z1);
reflectionPop[0] = 0;
for (int iPop = 1; iPop < Lattice<T>::q; iPop++) {
reflectionPop[iPop] = 0;
// iPop are the directions which pointing into the fluid, discreteNormal is pointing outwarts
if (Lattice<T>::c[iPop][0]*discreteNormalX + Lattice<T>::c[iPop][1]*discreteNormalY + Lattice<T>::c[iPop][2]*discreteNormalZ < 0) {
// std::cout << “—–” <<s td::endl;
int mirrorDirection0;
int mirrorDirection1;
int mirrorDirection2;
int mult = 2 / (discreteNormalX*discreteNormalX + discreteNormalY*discreteNormalY + discreteNormalZ*discreteNormalZ);mirrorDirection0 = (Lattice<T>::c[iPop][0] – mult*(Lattice<T>::c[iPop][0]*discreteNormalX + Lattice<T>::c[iPop][1]*discreteNormalY + Lattice<T>::c[iPop][2]*discreteNormalZ)*discreteNormalX);
mirrorDirection1 = (Lattice<T>::c[iPop][1] – mult*(Lattice<T>::c[iPop][0]*discreteNormalX + Lattice<T>::c[iPop][1]*discreteNormalY + Lattice<T>::c[iPop][2]*discreteNormalZ)*discreteNormalY);
mirrorDirection2 = (Lattice<T>::c[iPop][2] – mult*(Lattice<T>::c[iPop][0]*discreteNormalX + Lattice<T>::c[iPop][1]*discreteNormalY + Lattice<T>::c[iPop][2]*discreteNormalZ)*discreteNormalZ);// bounce back for the case discreteNormalX = discreteNormalY = discreteNormalZ = 1, that is mult=0
if (mult == 0) {
mirrorDirection0 = -Lattice<T>::c[iPop][0];
mirrorDirection1 = -Lattice<T>::c[iPop][1];
mirrorDirection2 = -Lattice<T>::c[iPop][2];
}// computes mirror jPop
for (reflectionPop[iPop] = 1; reflectionPop[iPop] < Lattice<T>::q ; reflectionPop[iPop]++) {
if (Lattice<T>::c[reflectionPop[iPop]][0]==mirrorDirection0 && Lattice<T>::c[reflectionPop[iPop]][1]==mirrorDirection1 && Lattice<T>::c[reflectionPop[iPop]][2]==mirrorDirection2) {
break;
}
}
//std::cout <<iPop << ” to “<< jPop <<” for discreteNormal= “<< discreteNormalX << “/”<<discreteNormalY <<std::endl;
}
}
}albert.minkModeratorHi Juliaan,
happy to see your results with bounce back. I do agree with you explanation of two different velocities.
Concerning the slip boundary. With a git diff localized the fix in src/boundary/boundaryPostProcessors3D.hh Let’s have a look. The developer version reads
albert.minkModeratorHi Juliaan,
the slip boundary in the most recent OpenLB version is found to be incorrect. (The release candidate is already fixed.) So I suspect the slip boundary to cause the error, at least at the top. What happens for a simple bounce-back top wall?
Regards
Albert Minkalbert.minkModeratorI like the way you prepared the data.
In https://ibb.co/kOaB2R (Front View) I would like to see the slip boundary, green bar, for the whole top wall. Right now there is one voxel at the ‘corners/edges’ that is a velocity or pressure boundary.
Change the code where function rename() is called and keep me informed about this artefacts on the boundary.Best wishes
Albert Mink -
AuthorPosts