Has anybody experience with the topic? Is it generally possible to implement such a model with Palabos?

Thanks in advance for your help!]]>

Language: C++T factor = param.rho * (param.dxFinest * param.dxFinest * param.dxFinest * param.dxFinest) / (param.dtFinest * param.dtFinest); Array<T,3> force = factor*boundaryCondition->getForceOnObject(); forces << (double) (iter * param.dtCoarsest) << " " << force[0] << " " << force[1] << " " << force[2] << std::endl;

My problem are now the values of the forces. They are quite big in comparison with the references (approximately 3x or 4x). I still have no free surface implemented in my code and i would therefore expect smaller values at least for the resistance. I also tried with different geometries, the problem remains the same.

Could the problem come from the conversion from lattice to physical units? Or, since i use a constant pressure as outflow condition, from the pressure reference at the outlet boundary? Would you suggest to use another method to compute the forces in my case?

Thanks in advance for your help!

Raffaele]]>

Thanks]]>

I am dipping my toes at multigrid modeling, and I am currently doing some exploration on the technique to understand it enough to model my problem. My goal is, at the end, to model a channel with a porous wall with a multigrid approach, where the duct is modeled with a coarser lattice and the porous wall with a grid with a much higher resolution.

This is a complicated problem, so I am first trying an easier problem to understand the best approach for this. Hence, I am developing a duct flow with an obstacle, where the grid is refined on the region around and past the obstacle, so the resolution is higher where the turbulent regime forms.

However, it seems that the defineDynamics function, which is used to parse bounce back dynamics to a region, cannot handle multi grid lattices. The following snippet is inside a loop which iterates at the iLevels of the multi grid structure:

Language: C++gridrefining.cpp:179:19: error: no matching function for call to ‘defineDynamics(plb::MultiGridLattice2D<double, plb::descriptors::D2Q9Descriptor>&, plb::Box2D, plb::Box2D&, plb::BounceBack<double, plb::descriptors::D2Q9Descriptor>*)’ defineDynamics(lattice, lattice.getBoundingBox(), ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ obstacle, new plb::BounceBack<T,DESCRIPTOR>);

By inspecting the Palabos devel guide, I see that defineDynamics is defined only for objects of the type BlockLatticeXD or MultiBlockLatticeXD. Thus, I understand why the direct application of defineDynamics to a lattice of the MultiGridLattice2D type fails.

However, the Palabos users guide, at the Grid Refinement section, states that:

alabos simply generates for you three separate multi-blocks, each of which holds the data at a certain level of grid refinement. [...] Palabos then gathers the three multi-blocks into a single data structure (but, for convenience, you can still access them individually), called “multi-grid” structure

So it seems that the MultiGridLattice2D is a shortcut to parse the entire structure to domain functionals, instead of having to parse each underlying multiblock individually. I believe this is precisely the obstacle I reached.

With all this in mind, how to I correctly parse each sub-multiblock of a multigrid structure, as a MultiBlockLatticeXD object, to parse it to a domain functional that expects this kind of input? With this answered, how's the best way to, then, define an obstacle through the defineDynamics function?

Thanks in advance!]]>

It seems like I posted the same topic in a wrong place. Please pardon me leaving the same notes. The following is the post I made in LBM:algorithms section.

I don't know if the forum is no longer active or not, but I would like to ask a question if anyone can help me writing a data processor.

I would like to have a data processor that spits out a std::vector that can be accessed outside of the data processor. Here is the code I wrote.

Language: C++template<typename T, template<typename U> class Descriptor> class ComputeScatteredRho3D : public BoxProcessingFunctional3D_L<T,Descriptor> { public: ComputeScatteredRho3D(std::vector<std::vector<int> > &locationVector_, std::vector<T> &rhoVector_, plint len_) : locationVector(locationVector_), rhoVector(rhoVector_), len(len_) {} virtual void process(Box3D domain, BlockLattice3D<T,Descriptor> &lattice) { for (plint i=0; i<len; ++i) { plint iX = locationVector[i][0]; plint iY = locationVector[i][1]; plint iZ = locationVector[i][2]; rhoVector[i] = lattice.get(iX,iY,iZ).computeDensity(); } } void getRhoVector(std::vector<T> &vect) { for (plint i=0; i<len; ++i) { vect[i] = rhoVector[i]; } } virtual ComputeScatteredRho3D<T,Descriptor>* clone() const { return new ComputeScatteredRho3D<T,Descriptor>(*this); } void getTypeOfModification(std::vector<modif::ModifT>& modified) const { modified[0] = modif::nothing; } private: std::vector<std::vector<int> > locationVector; std::vector<T> rhoVector; plint len; }; void getScatteredDensity3D(MultiBlockLattice3D<T,AVDES>& lattice, vector<vector<int>>& locationVector, vector<T>& newVector) { plint len = locationVector.size(); ComputeScatteredRho3D<T,AVDES> *aaa = new ComputeScatteredRho3D<T,AVDES> (locationVector, newVector, len); applyProcessingFunctional(aaa, lattice.getBoundingBox(), lattice); aaa->getRhoVector(newVector); delete(aaa); }

locationVector is a vector storing location information of a domain.

I want to have an access to rhoVector outside of the data processor using a function getRhoVector. However, it seems like the rhoVector is destroyed after the function applyProcessingFunctional.

Can anyone give me advice on solving this problem? Any help would be greatly appreciated.

Best,

hjung]]>

I am running the simulation to compute the permeability of a 3D Porous Medium. My sample dimensions are 1232x1197x1197. It seems that it is using a considerable amount of memory as the job submitted to the cluster is rejected. I downsized the sample to 50% and now it is running. I would like to know how to calculate the amount of memory the simulation uses knowing the size of the sample.

Thanks in advance

jleon]]>

Thanks a lot！]]>

In these problems, compressibility effects are present even at low speeds. In such a way that the density is not constant, therefore the pressure gradient can not be represented as a force body.

On the other hand, the relaxation time is not related to the viscosity (by means of Reynolds' number), but to the Knudsen's number, additionally there is a slip condition of the fluid with respect to the wall.

Therefore, I modified a file in Palabos (unit.h), so that the relaxation time is obtained by means of Knudsen's number. Already verify this change, with benchmark problems. Observing how to work with the concept of pressure gradient in the example permeability.cpp, I implemented it to work with the Poiseuille problem and a pressure gradient, but it does not work.

Thanks to everyone for reading, I appreciate any contribution. It can be very short, that is, "read this document" or "looking at the source code that I append".

Thank you very much,

Mauricio

]]>Language: C++

#include"palabos3D.h" #include"palabos3D.hh" #include <cstdlib> #include <vector> #include <cmath> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> using namespace plb; using namespace std; using namespace plb::descriptors; typedef double T; #define DESCRIPTOR D3Q27Descriptor #define DYNAMICS BGKdynamics<T, DESCRIPTOR>(parameters.getOmega()) // // Aca definimos el gradiente de presion class PressureGradient { public: PressureGradient(T deltaP_, plint nx_) : deltaP(deltaP_), nx(nx_) { } void operator() (plint iX, plint iY, plint iZ, T& density, Array<T,3>& velocity) const { velocity.resetToZero(); density = (T)1 - deltaP*DESCRIPTOR<T>::invCs2 / (T)(nx-1) * (T)iX; } private: T deltaP; plint nx; }; void channelSetup(MultiBlockLattice3D<T,DESCRIPTOR>& lattice, IncomprFlowParam<T> const& parameters, OnLatticeBoundaryCondition3D<T,DESCRIPTOR>& boundaryCondition, T deltaP) { const plint nx = parameters.getNx(); const plint ny = parameters.getNy(); const plint nz = parameters.getNz(); // // Microchannel';s Geometry //================================================================== Box3D bottom(0, nx-1, 0, 0, 0, nz-1); Box3D top (0, nx-1, ny-1, ny-1, 0, nz-1); Box3D right (0, nx-1, 0, ny-1, nz-1, nz-1); Box3D left (0, nx-1, 0, ny-1, 0, 0); Box3D outlet(nx-1, nx-1, 1, ny-2, 1, nz-2); Box3D inlet (0, 0, 1, ny-2, 1, nz-2); // //boudary==================================================== / boundaryCondition->addPressureBoundary0N(inlet, lattice); setBoundaryDensity(lattice, inlet, (T) 1.); // initializeAtEquilibrium(lattice, inlet, PressureGradient(deltaP, nx) // ); boundaryCondition->addPressureBoundary0P(outlet, lattice); setBoundaryDensity(lattice, outlet, (T) 1. - deltaP*DESCRIPTOR<T>::invCs2); initializeAtEquilibrium(lattice, lattice.getBoundingBox(), PressureGradient(deltaP, nx) ); lattice.initialize(); delete boundaryCondition; } template<class BlockLatticeT> void writeVTK(BlockLatticeT& lattice, IncomprFlowParam<T> const& parameters, plint iter){ T dx = parameters.getDeltaX(); T dt = parameters.getDeltaT(); VtkImageOutput3D<T> vtkOut(createFileName("vtk", iter, 6), dx); vtkOut.writeData<float>(*computeVelocityNorm(lattice), "velocityNorm", dx/dt); vtkOut.writeData<float>(*computeDensity(lattice), "density", 1.); } T computeVmedia ( MultiBlockLattice3D<T,DESCRIPTOR>& lattice, IncomprFlowParam<T> const& parameters , Box3D domain ) { T meanU = computeAverage ( *computeVelocityNorm (lattice, domain) ); T meanUphys = (parameters.getDeltaX() / parameters.getDeltaT()) * meanU; return meanUphys; } int main(int argc, char **argv){ plbInit(&argc,&argv); global::directories().setOutputDir("./tmp/"); IncomprFlowParam<T> parameters( (T) 0.63746, //Velocity at physical units (T) 0.03, //Velocity LB (T) 0.025, //Knudsen';s number (T) 1e-6, // caractheristc Lenght (T) 16., //Resolution (T) 18, //times lenght x (T) 1, //times lenght y (T) 3 //times lenght z ); T gradP = (T)1; const T maxT = (T)39e-6; const T imSave = (T)maxT/(T)10; T deltaP = (T)gradP * parameters.getDeltaX(); writeLogFile(parameters, "Parameters_Microchannel"); plint nx = parameters.getNx(); plint ny = parameters.getNy(); plint nz = parameters.getNz(); MultiBlockLattice3D<T, DESCRIPTOR> lattice( nx,ny,nz, new DYNAMICS); util::ValueTracer<T> convergen(parameters.getPhysicalU(), parameters.getPhysicalLength(), 1e-5); lattice.periodicity().toggleAll(false); OnLatticeBoundaryCondition3D<T,DESCRIPTOR>* boundaryCondition = createLocalBoundaryCondition3D<T,DESCRIPTOR>(); channelSetup(lattice, parameters, *boundaryCondition, deltaP); plb_ofstream UPvsT("./tmp/VvsT_320.dat"); Box3D profileSectionFinal(nx/2, nx/2, ny/2, ny/2,0, nz - 1);//A lo largo del eje Z Box3D profileSectionUP1(nx/2, nx/2, ny/2, ny/2, nz/2, nz/2); plint counter = 0; T unit_velo = parameters.getDeltaX() / parameters.getDeltaT() / parameters.getLatticeU(); for(plint iT=0; iT*parameters.getDeltaT()<1.01*maxT; ++iT){ counter += 1; double TimE = iT*parameters.getDeltaT(); lattice.collideAndStream(); convergencia.takeValue(getStoredAverageEnergy(lattice),true); if(convergen.hasConverged()){ pcout << "Simulation respect to kinetic energy mean" << endl; pcout << "Simulation';s Time =" << TimE << endl; break; } UPvsT << setprecision(16) << TimE << " " << *multiply(*computeVelocityNorm (lattice, profileSectionUP1),unit_velo) << endl; } T Vmedia = computeVmedia(lattice, parameters, profileSectionFinal); pcout <<"mean velocity ="<<" "<< Vmedia << endl; return 0; }

When I set const pressure value to one side of a box,and other side were set to freeslip .there will be velocity in the box.But the four edges of inlet( the pressureboundary ) have velocity=0,which will make the model error after several steps.

If you meet the samilar problem,we can have a communication.

dongxueyang

email: dxy159753@sina.com]]>

I am modeling a flow with const velocity.In a box, there is one inlet, one outlet and four sidewall. About the boundarycondition, I set like this:

OnLatticeBoundaryCondition3D<T,DESCRIPTOR>* boundaryCondition = createLocalBoundaryCondition3D<T,DESCRIPTOR>();

Box3D inlet = Box3D(0 ,nx-1,0 , 0 , 0 , nz-1);

Box3D outlet = Box3D(0 ,nx-1,ny-1, ny-1, 0 , nz-1);

Box3D front = Box3D(nx-1,nx-1,1 , ny-2, 0 , nz-1);

Box3D back = Box3D(0 ,0 ,1 , ny-2, 0 , nz-1);

Box3D top = Box3D(1 ,nx-2,1 , ny-2, nz-1, nz-1);

Box3D bottom = Box3D(1 ,nx-2,1 , ny-2, 0, 0 );

boundaryCondition->setVelocityConditionOnBlockBoundaries ( *lattice, inlet, boundary::dirichlet );

boundaryCondition->setVelocityConditionOnBlockBoundaries ( *lattice, outlet, boundary::outflow );

T vy = getInletVelocity(param.inletVelocityLB, 0, param.startIter);

setBoundaryVelocity(*lattice, inlet, Array<T,3>( (T) 0,vy, (T) 0));

boundaryCondition->setVelocityConditionOnBlockBoundaries ( *lattice, bottom, boundary::freeslip );

boundaryCondition->setVelocityConditionOnBlockBoundaries ( *lattice, front, boundary::freeslip );

boundaryCondition->setVelocityConditionOnBlockBoundaries ( *lattice, back, boundary::freeslip );

boundaryCondition->setVelocityConditionOnBlockBoundaries ( *lattice, top, boundary::freeslip );

initializeAtEquilibrium( *lattice, lattice->getBoundingBox(), param.rhoLoLB, Array<T,3>( (T) 0,vx, (T) 0));

lattice->initialize();

lattice->toggleInternalStatistics(false);

The speed at the boundary advances from the entrance to the exit. After reaching the exit, the speed increases and in turn advances toward the entrance. After several cycles, the overall speed becomes larger until the calculation is wrong.

is there anyone can give me any advice?]]>

I trying to compile the tutorial_2 on a macOS, but I have a issue. My mac has phyton3.x and the Palabos uses previous phyton versions to compile. The error is

"scons: *** SCons version 2.1.0 does not run under Python version 3.6.0. Python 3.0 and later are not yet supported".

Anyone knows how to resolve this issue?.

I did not find the right solution from the internet.

References:-

[www.palabos.org]

B2B Online Video

Thanks]]>

I am interested in implementing some simple spatial filters and trying to write a functional for it. I am now facing some problems and was wondering if anyone has any idea about it:

- As descript in the documentation:

QuoteRule 0 of data processors: A data processor must always be written in such a way that executing the data processor on a given domain has the same effect as splitting the domain into two sub-domains, and then executing the data processor consecutively on each of these sub-domains.

Does it mean, there is no way to treat the boundary separately?

- Also, as written in the documentation:

QuoteOn nearest-neighbor lattices (D2Q9, D3Q19, etc.), you can be non-local by one cell but no more

If so, what can I do if I want to access two or even more cells further neighbors? Does it mean this is no way to write a functional for such operation?

I will very appreciate your answers,

With best,

Song]]>

I am trying to modify the aneurysm show case to run a sloshing simulation in a tank (I have the STL file). I started off by removing the inlet outlet parts of the code, since the tank won't have any inlet and outlet in my case. I was also able to successfully load the STL file. I already have a function which calculates the force at a time instant and have changed the BGKdynamics to GuoExternalForceSmagorinskyBGKdynamics. I am stuck in how to initialize the fluid inside the tank. At start time, there should be 20% water in the tank. Now I could do this like it has been done in damBreak case but in this case I also have baffles in the tank and owing to the large number of baffles, it's not possible for me to manually write a condition for X,Y and Z coordinates to initialize fluid. Is it possible to have a general piece of code which can initialize the fluid inside such a domain without manually specifying the locations of the obstacles (as has been done in the damBreak case)?

Thank you in advance

Vishwesh]]>

I'm having trouble imposing boundary conditions on a voxelized domain similar to the aneurysm example. In that example a velocity inlet boundary condition is used, while in the other two outlets, a constant pressure Neumann boundary condition is imposed.

I am trying to make something similar, but with a constant pressure Neumann boundary condition on the inlet and a time dependant Neumann boundary condition on the outlet, so that the flow oscillates.

Also, I'm having trouble on the geometry importing step. I can't seem to find a way to make the domain fit to the size of my drawing. Also like in the aneurysm case, where the domain envelops the 3D mesh almost perfectly. When I thy to follow a similar procedure, my domain doesn't match the size of my drawing.

Thank you all.]]>

I've tried to use the following line of code but it didn't compile.

lattice.get(someX,someY,someZ).computeDensity(someVariable)

What I'm trying to do with the above code is accessing the cell and sum up the distribution functions of the cell and spit out the density value to "someVariable".

Could anyone tell me what is wrong with this approach?

In addition, I found out that I can get the density of cells over the entire domain by simply doing this

*computeDensity(lattice)

which can be useful later for me with one condition.

I need to store the computed values in a vector to be used for a third-party library but I have no idea how to convert MultiScalarFieldXD to a vector.

Any help would be greatly appreciated

Thanks in advance,

hjung]]>

I am trying to validate the multicomponent2D- rayleigh taylor code given in palabos show cases using this paper. There are several queries that I have regarding this:

1. The paper mentions:

Quote

The initial perturbation of the interface is a sinusoidal function, with amplitude A = 0.1W and wavelength λ = 2π/W

When I refer to the current code, the interface is defined using the following piece of code:

Language: C++// Initialize top layer. applyIndexed(heavyFluid, Box2D(0, nx-1, 0, ny-1), new TwoLayerInitializer<T,DESCRIPTOR>(ny, true) ); // Initialize bottom layer. applyIndexed(lightFluid, Box2D(0, nx-1, 0, ny-1), new TwoLayerInitializer<T,DESCRIPTOR>(ny, false) );

Considering that I do know the equation for the interface which will be a function of x, how can I initialize the interface according to this?

2. Also, the paper does not mention about perturbation due to density variation so I changed the densityFluctuation to 0. Will it cause any problems?

3. The computational domain in the paper has been described to be W = 100 and height = 4W = 400. Also, the grid has also been defined. But, in the current example, the domain size is defined by nx and ny and changing them is the only way to change the domain as well as the mesh. Any other way to resolve it?

4. I referred to a paper on Shan-Chen model which described G to be a quantity which defines the interaction between the fluids. Also, according to the paper, G value cannot be calculated using a formula. If this is the case then how did we arrive to G=0.15

5. Why is gravity defined to be 0.45/ny? Has this been done to make the quantity dimensionless? If that's the case, how did we arrive to 0.45?

I would be really grateful for any help I can get regarding this matter.

Thanks in advance

Vishwesh]]>

I was trying to understand how external geometry can be used as an input on Palabos and I was using the externalFlowAroundObstacle as a starting point for this. I wanted to simulate a circular duct, similar to a poiseuille flow example but with an imported geometry. So drew the duct on a CAD software and gave it a length slightly lesser than the simulation domain, if I try to have it with the same size or bigger than the domain, I get the following error messages:

Errors

------

Caught exception in process 0. Palabos generic exception:

List of error messages (not chronological):

1) Error treating the geometry in the Guo off-lattice model.

2) Guo off-lattice model could not find an intersection with a triangle.

But once I had the duct half outside the domain by accident and the simulation ran fine, but I can't understand how.

I wanted to do this in order to have the boundary condition completely inside the duct.

Best regards,

Fernando]]>

I am running the showcases of cylinder in 2D flow with the velocity BC around inlet, up and down; and outflow (zero-gradient of all velocity components) BC at the outlet.

As all these boxes are bounce-back, namely, they will reflect the pressure wave all the time, which would bring unsteadiness and collapse the program at high Re.

So I am asking whether there is any method or function to apply non-reflecting boundary condition on the outlet?

Really hope to hear from you. Any information is appreciated.

Cheers,

Eric]]>

I am not experienced using Palabos. I was trying to run the show case "generalExternalFlow" in Code::blocks for windows. The code builts without problems but when running it, it crashes immediately. I think it has something to do with a missing input, (the one required when running the code with the terminal in unix-like systems).

Any help is much appreciated.

Men]]>

I'm working on a reactive transport problem in porous media and wondering if it is possible to couple Palabos to an external reaction module, Phreeqc, in every time step.

To be specific, what I would like to do is transport mass and feed the transported mass to a reaction module, calculate new mass, and feed the new mass back into palabos, and transport new mass again in the next time step.

What I'm not sure is the part: feed the new mass back into palabos. Is it possible to do this? If it is, how can I do it?

Thanks in advance for any feedback,

hjung]]>

I am trying to add a crossflow in the falling droplet showcase. Any suggestions regarding how I can add it? I was trying to follow the externalFlowAroundObstance show case but it is very difficult to understand and modify for my problem. Can someone please help me out?

Thanks

Vishwesh]]>

The xml file reads as follows:

<?xml version="1.0" ?>

<geometry>

<mesh> ./channel.stl </mesh>

<!-- Inlet diameter (m). This parameter has no impact on the simulation,

and is only used to display the Reynolds number. -->

<inletDiameter> 0.0005 </inletDiameter>

<!-- Average inlet velocity in physical units (m/s). -->

<!-- averageInletVelocity> 0.071176 </averageInletVelocity -->

<averageInletVelocity> 0.012 </averageInletVelocity>

<!-- The STL geometry provided by the user has openings (inlets and outlets).

It must not be provided by the user closed. -->

<openings>

<!-- 0 means x-direction, 1 means y-direction and 2 means z-direction. -->

<sortDirection> 0 </sortDirection>

<!-- According to the sortDirection, the user provides which openings are

inlets and which are outlets. -->

<type> Inlet Outlet </type>

</openings>

</geometry>

<!-- All fluid properties are given in physical units. -->

<fluid>

<kinematicViscosity> 3.7037e-06 </kinematicViscosity>

<density> 1080 </density>

<volume> 3.0-9 </volume>

</fluid>

<numerics>

<!-- The referenceDirection is used for the resolution.

0 means x-direction, 1 means y-direction and 2 means z-direction. -->

<referenceDirection> 0 </referenceDirection>

<!-- The reference resolution is the resolution at the grid refinement level 0. -->

<referenceResolution> 800 </referenceResolution>

<nuLB> 0.00062 </nuLB>

</numerics>

<simulation>

<!-- Upper limit for time of simulation (s). The simulation may abort

earlier if convergence is reached. -->

<simTime> 1000 </simTime>

<!-- Maximum level for smooth grid refinement. -->

<maxLevel> 0 </maxLevel>

<epsilon> 1.e-1 </epsilon>

<performOutput> True </performOutput>

<doImages> True </doImages>

<!-- Extrapolation scheme for the off lattice boundary condition. -->

<useAllDirections> True </useAllDirections>

<!-- Use an off lattice boundary condition which is closer in spirit to

regularized boundary conditions. -->

<useRegularizedWall> True </useRegularizedWall>

<!-- Use an incompressible BGK model or the standard BGK model. -->

<useIncompressible> True </useIncompressible>

<!-- Use Poiseuille profile as an inflow boundary condition, or use

a simple plug profile instead. -->

<poiseuilleInlet> True </poiseuilleInlet>

<convectiveScaling> False </convectiveScaling>

</simulation>

Regards,

Si]]>

I am running the dambreak3d show case and want to plot pressure v/s time curve at a set of particular points (I have the physical coordinates of the points). Is it possible to introduce pressure probes in the code somehow?

I am aware of using compurepressure function (similar to externalFlowAroundObstacle.cpp) for exporting pressure values at all points. I guess it's also possible to use ParaView later on during post processing and getting the pressure v/s time plot at the points but is pressure probe method possible in palabos?

Also, considering the following code snippet from external flow around obstacle example:

How do I edit this code for dam break test case? There is no boundary condition (bc) variable there.Language: C++// Write VTK file for the flow around the obstacle, to be viewed with Paraview. void writeVTK(OffLatticeBoundaryCondition3D<T,DESCRIPTOR,Velocity>& bc, plint iT) { VtkImageOutput3D<T> vtkOut(createFileName("volume", iT, PADDING)); vtkOut.writeData<float>( *bc.computeVelocityNorm(param.boundingBox()), "velocityNorm", param.dx/param.dt ); vtkOut.writeData<3,float>(*bc.computeVelocity(param.boundingBox()), "velocity", param.dx/param.dt); vtkOut.writeData<float>( *bc.computePressure(param.boundingBox()), "pressure", param.dx*param.dx/(param.dt*param.dt) ); }

Thanks in advance

Vishwesh]]>

I want to create two refinement areas, and they have coincidence parts. How shall I deal with this situation? I tried to create two Box3D which are adjacent to each other like below(Intersect at x-axis):

Box3D b1(0, x1 , 0, y1, 0, z1);

Box3D b2(x1+1, x2, 0, y2, 0, z2);

management.refine(0,b1);

management.refine(0,b2);

My idea is that the two Box3D refinement can be defined by telling the starting coordinate at next grid: x1+1.

But this didn't work. Is my idea wrong?

Otherwise, is there any function that can create a complex area by combining various Box3D, like box1+box2-box3 or something like that?

Thank you very much.

with best wishes

steed188]]>

I'm fairly new to Palabos and LBM and have run into issues with the boundary conditions of my free-surface simulation.. Is there any legitimate way to set boundary conditions (on or off lattice) using an STL file in free-surface?

I've tried adapting the method used in externalFlowAroundObstacle.cpp (see snippet below) by using "fields.lattice" instead of "*lattice" in the call to offLatticeBoundaryCondition3D. However, this causes crashes when my SparseBlockStructure is using more than 1 atomicblock/processor.

Language: C++OffLatticeBoundaryCondition3D<T,DESCRIPTOR,Velocity> *boundaryCondition; BoundaryProfiles3D<T,Velocity> profiles; bool useAllDirections=true; OffLatticeModel3D<T,Velocity>* offLatticeModel=0; if (param.freeSlipWall) { profiles.setWallProfile(new FreeSlipProfile3D<T>); } else { profiles.setWallProfile(new NoSlipProfile3D<T>); } offLatticeModel = new GuoOffLatticeModel3D<T,DESCRIPTOR> ( new TriangleFlowShape3D<T,Array<T,3> >(voxelizedDomain.getBoundary(), profiles), flowType, useAllDirections ); offLatticeModel->setVelIsJ(velIsJ); boundaryCondition = new OffLatticeBoundaryCondition3D<T,DESCRIPTOR,Velocity>( offLatticeModel, voxelizedDomain, *lattice); boundaryCondition->insert();

I'd be grateful for any help on this :)]]>

I created the 3 level lattice2D and want to set different boundary for different edge, but it does not success.

It is like this.

Language: C++ (QT)void applyOuterBoundaryConditions( MultiGridLattice2D<T,DESCRIPTOR>& lattice, ConvectiveRefinementParameters<T> const& parameters, OnLatticeBoundaryCondition2D<T,DESCRIPTOR>& bc) { Box2D coarsestBoundingBox=lattice.getComponent(0).getBoundingBox(); for (plint iLevel = 0; iLevel < lattice.getNumLevels(); ++iLevel) { MultiBlockLattice2D<T,DESCRIPTOR>& oneLattice = lattice.getComponent(iLevel); oneLattice.periodicity().toggleAll(false); Box2D boundingBox = coarsestBoundingBox.multiply(util::intTwoToThePower(iLevel)); Box2D box = boundingBox; Box2D inlet (box.x0, box.x0, box.y0-1, box.y1-1); Box2D outlet (box.x1, box.x1, box.y0-1, box.y1-1); Box2D yBottom (box.x0, box.x1, box.y0, box.y0); Box2D yTop (box.x0, box.x1, box.y1, box.y1); // Inlet boundary condition. bc.setVelocityConditionOnBlockBoundaries(oneLattice, boundingBox, inlet, boundary::dirichlet); // Outlet boundary condition. bc.setVelocityConditionOnBlockBoundaries(oneLattice, boundingBox, outlet, boundary::outflow); // Lateral boundary conditions. bc.setVelocityConditionOnBlockBoundaries(oneLattice, boundingBox, yBottom, boundary::dirichlet); bc.setVelocityConditionOnBlockBoundaries(oneLattice, boundingBox, yTop, boundary::dirichlet); //Initial Velocity & Density setBoundaryVelocity( lattice.getComponent(iLevel), lattice.getComponent(iLevel).getBoundingBox(), Array<T,2>((T)0.,(T)0.) ); initializeAtEquilibrium( lattice.getComponent(iLevel), lattice.getComponent(iLevel).getBoundingBox(), InletVelocity<T>(parameters[iLevel]) ); } lattice.initialize(); }

I know that to the coarsest grid I can set the different edges boundary by telling the x0,x1,y0,y1. But I've no idea how to deal with the fine girds.

2. And as showed in the dipole case, the grid is written into VTK files by interpolate it to the finest grids using

writeVTK(*lattice.convertToLevel(interpLevel),parameters[interpLevel],interpLevel,iT);

But I want to write the original multigrids to the VTK files to see the grids status. How should I do?

Thank you very much.

best wishes,

steed188]]>

I want to simulate a fluid initially at rest in a closed container and now moving due to an external momentum source applied on the container. I have tried the same in OpenFOAM by applying a momentum source table in fvOptions file. Can someone guide me about how to do the same in Palabos?

Thanks in advance

Vishwesh]]>

This is regarding the dambreak 3d test case available in show cases example. I tried the test case for the following parameters using 40 processors but couldn't get the droplets as the rendered video on the website shows. Can anyone tell me what are the parameters and post processing method to obtain similar result?

I am using ParaView 4.4.0 and plotting contours for volumeFraction.vti files but I am not able to get the splash and the droplets.

Thanks in advance

Vishwesh]]>

"vtable for plb::BoundedReductiveBoxProcessingFunctional3D", referenced from:

void plb::computeBoundedAverage<double>(plb::MultiNTensorField3D<double>&, plb::Box3D, double*, int) in dataAnalysisWrapper3D.os

plb::BoundedBoxNTensorSumFunctional3D<double>::~BoundedBoxNTensorSumFunctional3D() in dataAnalysisWrapper3D.os

void plb::maskedComputeBoundedAverage<double>(plb::MultiNTensorField3D<double>&, plb::MultiNTensorField3D<int>&, plb::Box3D, double*, int) in dataAnalysisWrapper3D.os

plb::BoundedMaskedBoxNTensorSumFunctional3D<double>::~BoundedMaskedBoxNTensorSumFunctional3D() in dataAnalysisWrapper3D.os

plb::BoundedBoxNTensorSumFunctional3D<double>::~BoundedBoxNTensorSumFunctional3D() in dataAnalysisWrapper3D.os

plb::BoundedMaskedBoxNTensorSumFunctional3D<double>::~BoundedMaskedBoxNTensorSumFunctional3D() in dataAnalysisWrapper3D.os

plb::BoundedBoxNTensorSumFunctional3D<double>::BoundedBoxNTensorSumFunctional3D(long) in dataAnalysisFunctional3D.os

...

NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

scons: *** [lib/libplbwrapBlock_double.dylib] Error 1

scons: building terminated because of errors.

make: *** [compilation] Error 2

I would appreciate any help.

Thanks]]>