albert.mink
Forum Replies Created
-
AuthorPosts
-
albert.minkModerator
Dear Mamin,
there is no 2d implementation at this point. However, depending how familiar you are with c++, is will take you minutes to implement one. So, feel free to contribute a trapezoid implementation to OpenLB and its community.
Best regards,
Albertalbert.minkModeratorWell, you answered your question already. Do not put pressure boundary for outflow and for inflow. Wont’t work!
albert.minkModeratorHi
it seems that your simulation has diverged.
Have a look in the .dat file in directory tmp and tell me the TAU
Regards
albert.minkModeratorWell, the code provides only lattice units, see force and omega1 resp omega2. At that point we do not relate those values to physical units.
Feel free to participate to OpenLB and provide physical related version of multicomponent2D.
In fact we prepare a new LBconverter for the upcoming release of OpenLB.albert.minkModeratorCan you tell me which specific physical units you are looking for?
From my developper point of view, I need a hint from your side.
albert.minkModeratorDear bujji,
the values nx denotes the number of cells in x direction.
albert.minkModeratorI implemented some basic application to cylinder2d from OpenLBv1.1
—
if ( iT == 0 ) {
// Writes the geometry, cuboid no. and rank no. as vti file for visualization
SuperLatticeGeometry2D<T, DESCRIPTOR> geometry( sLattice, superGeometry );
SuperLatticeCuboid2D<T, DESCRIPTOR> cuboid( sLattice );
SuperLatticeRank2D<T, DESCRIPTOR> rank( sLattice );
vtmWriter.write( geometry );
vtmWriter.write( cuboid );
vtmWriter.write( rank );vtmWriter.createMasterFile();
// steed188
AnalyticalConst2D<double,double> constTwo( 2.0 );
AnalyticalConst2D<double,double> constOne( 1);
AnalyticalIdentity2D<double,double> TwoMinusOne(constTwo-constOne);SuperLatticeFfromAnalyticalF2D<double,DESCRIPTOR> TwoMinusOne_lattice( TwoMinusOne,sLattice,superGeometry );
vtmWriter.write( TwoMinusOne_lattice );
}// Writes the vtk files
if ( iT%vtkIter == 0 && iT > 0 ) {
vtmWriter.write( iT );SuperEuklidNorm2D<T, DESCRIPTOR> normVel( velocity );
BlockLatticeReduction2D<T, DESCRIPTOR> planeReduction( normVel );
BlockGifWriter<T> gifWriter;
//gifWriter.write(planeReduction, 0, 0.7, iT, “vel”); //static scale
gifWriter.write( planeReduction, iT, “vel” ); // scaled// steed188
SuperLatticePhysVelocity2D<T, DESCRIPTOR> velocity_lattice( sLattice, converter );
AnalyticalConst2D<double,double> constThree( 3.0 );
SuperLatticeFfromAnalyticalF2D<double,DESCRIPTOR> constThree_lattice( constThree,sLattice,superGeometry );
SuperIdentity2D<double,double> velocityTimesConstThree(velocity_lattice*constThree_lattice);
vtmWriter.write( velocityTimesConstThree, iT );}
—-
albert.minkModeratorHi steed188,
respect for digging in OpenLB. So far you got realy deep 😉
I would like to see much more people doing so.First, pay attention to the dimensions.
SuperLatticePhysVelocity3D maps from R^3 -> R^3
AnalyticalConst3D maps from R^3 -> R^1However, to get a three dimensional Image, OpenLB overloads the constructor by:
—-
AnalyticalConst3D<T,T> Number2( T( 1. ),T( 1. ),T( 1. ) ); // will map from R^3 -> R^3
—-Second, I think OpenLB does not offer a functor to only manipulate a single component of a vector. We are not aware of any application for this operation. Fortunately, it is more of less easy to implement such a functor.
Third, OpenLB requires a lattice functor for writing simulation data to VTK format. You definitely can not store analytical functors. Usually, those mulitplication or other arithmetic operations of velocity fields are done by post processing tools, see ParaView filter CALCULATOR. However, if the result is needed at simulation time, there is perhaps no need to write the data to file system.
Third, I do not get the point of several lattices. I am used to have a lattice for a flow field. So as long as you stay with single phase flows, there is no need to deal with several lattices. What is your point?
Best regards,
Albertalbert.minkModeratorHi steed188,
there are several ways to get your velocity data modified.
Fist, velocity as you put it in your post has x,z,y component. Perhaps you prefer to compute the magnitude (l^2 norm, see SuperEuklidNorm3D<T,DESCRIPTOR> http://optilb.com/DoxyGen/html/d6/d91/classolb_1_1SuperEuklidNorm3D.html ) first and then divide it by two.These is one way how OpenLB may help you, more details can be found in your documentation, Chapter Functors.
Operations such as multiplication (pointwise) with a constant, or linear function, … are usually done via Analytical Functors. Now, in order to manipulate a lattice Functor, you have to transform it first to an analytical functor and then apply the algebraic operations. Afterwards transform the functor back to a lattice functor, see interpolationF.h
Regards,
Albertalbert.minkModeratorDear steed188,
please have a look to our examples and user guide.We provide easy generation of velocity field, linear functions and many more.
Best regards,
Albertalbert.minkModeratorWell, this is the entire Makefile.inc 😉
Anyway, modify it according
CXX := mpic++
PARALLEL_MODE := MPIThen, run
make cleanbuild
make clean
make// Till now, you executed a sequential programm on several threads. With the above modifications the compiler will generate a parallel program.
Albert
albert.minkModeratorI see, the forum does not support any kind of attachement. That is not good.
By now, just copy the first 66 lines of the Makefile.inc in the thread.
Best regards,
Albertalbert.minkModeratorYes, I agree. In your situation, several processes want to access the same file and then it crashes somehow.
So this means you might have a careful look on you MPI.
Can you post YOUR Makefile.inc in the OpenLB project?
albert.minkModeratorDear Steed188,
I attached the sample pvd from cylinder3d. No matter if you you execute sequential or parallel, yout pvd file should look like this.
<?xml version=”1.0″?>
<VTKFile type=”Collection” version=”0.1″ byte_order=”LittleEndian”>
<Collection>
<DataSet timestep=”0″ group=”” part=”” file=”data/cylinder3d_iT0000000.vtm”/>
<DataSet timestep=”900″ group=”” part=”” file=”data/cylinder3d_iT0000900.vtm”/>
…
</Collection>
</VTKFile>By the way, can you open the pvd file with a web browser?
Regards,
Albertalbert.minkModeratorHi Shaun,
tell me how many timesteps can you select in ParaView?
Regards,
Albert -
AuthorPosts