sahilbhapkar30
Forum Replies Created
-
AuthorPosts
-
sahilbhapkar30Participant
Hello,
I am considering a case where I have a rectangle geometry. The left vertical wall is kept at 278K, while the right vertical wall is kept at 318K. This wall temperature I am setting using setAdvectionDiffusion Temperature boundary. Now, for the horizontal wall, I want to have linearized temperature distribution in the horizontal direction such that the temperature on the wall would be a function of the distance. At x=0,it would be 278K, at x=L/2 it would be 298K and x =L it should be 318K.
In addition, I also want to know how the temperature non-dimensional conversion is done. In the previous blogs, I read that the Thot is set to 1 in non-dimensional units, while the Tcold is set to 0. Is it set this way?
I hope that you are able to understand the question
Thank-you.
Best regards,
Sahilsahilbhapkar30ParticipantHello,
Thank-you for the reply.
Could you tell me any other boundary conditions available where I can use as Neumann velocity BC for the outlet?
Thank-you
sahilbhapkar30ParticipantHello,
Thank-you for the reply.
Could you tell me the difference between the setAdvectionDiffusionTemperatureBoundary and setRegularizedTemperatureBoundary?
Thank-you
Sahilsahilbhapkar30ParticipantHello,
I visited the site and also the file src/core/cells.hh
I initialized as follows:
ConstCell<T,DESCRIPTOR> cell = blockLattice.get(iX, iY);
T cell.neighbor({n0,n1}).computeRho(u_neighbor1.data());
and I am still getting the error
expected initializer before ‘.’ token
240 | T cell.neighbor({n0,n1}).computeRho(u_neighbor1.data());
| ^Could you please help me with it?
Thank-you
sahilbhapkar30ParticipantHello,
I tried earlier with computeRho and defineRho, however I got an error while compiling.
cell.neighbor({n0,n1}).computeRho(u_neighbor1.data());
So this is the code. I wanted to calculate the the temperature on this cell, where n0 is the normal in the tangential direction(0 in this case) and n1 is the normal in the y direction. This code works fine when I use the computeU and defineU functions. But for the Rho it is giving me the following error.
error: no matching function for call to ‘olb::Cell<double, olb::descriptors::D2Q5<olb::descriptors::VELOCITY> >::computeRho(double*)’
Could you please help me in solving the error?
Thank-you,
Sahil Bhapkarsahilbhapkar30ParticipantHello,
Thank-you for your reply.
I already have went through the venturi3d example. However, the geometry in this example, they have added the primitives geometry in it. I am facing the problem in the subtraction of the primitives. For example:
Following is the implementation which I have tried for the bstep3d example. However, when I run the following code, the geometry shape does not match with the original geometry of bstep3d.
// Parameters for the simulation setup const T lx1 = 5.0; // length of step const T ly1 = 0.75; // height of step const T lx0 = 18.0; // length of channel const T ly0 = 1.5; // height of channel const T lz0 = 1.5; // width of channel const int N = 20; // resolution of the model const int M = 25; // resolution of the model const T maxPhysT = 40.; // max. simulation time in s, SI unit // Stores geometry information in form of material numbers //void prepareGeometry( UnitConverter<T,DESCRIPTOR> const& converter, // SuperGeometry3D<T>& superGeometry ) SuperGeometry3D<T> prepareGeometry( UnitConverter<T,DESCRIPTOR> const& converter ) { OstreamManager clout( std::cout,"prepareGeometry" ); clout << "Prepare Geometry ..." << std::endl; //#ifdef PARALLEL_MODE_MPI //const int noOfCuboids = singleton::mpi().getSize(); //#else const int noOfCuboids = 10; //#endif // setup channel Vector<T,3> extendChannel( lx0, ly0, lz0 ); Vector<T,3> originChannel( 0, 0,0); std::shared_ptr<IndicatorF3D<T>> channel = std::make_shared<IndicatorCuboid3D<T>>( extendChannel, originChannel ); // setup step Vector<T,3> extendStep( lx1, ly1, lz0); Vector<T,3> originStep( 0, 0,0); std::shared_ptr<IndicatorF3D<T>> step = std::make_shared<IndicatorCuboid3D<T>>( extendStep, originStep ); CuboidGeometry3D<T>* cuboidGeometry = new CuboidGeometry3D<T>( *(channel-step), converter.getConversionFactorLength(), noOfCuboids ); HeuristicLoadBalancer<T>* loadBalancer = new HeuristicLoadBalancer<T>( *cuboidGeometry ); // Instantiation of a superGeometry SuperGeometry3D<T> superGeometry( *cuboidGeometry, *loadBalancer, 2 ); // material numbers from zero to 2 inside geometry defined by indicator superGeometry.rename(0,2, *(channel-step) ); superGeometry.rename(2,1,1,1,1); //superGeometry.rename( 0,2 ); //superGeometry.rename( 2,1,1,1,1 ); //Vector<T,3> extend( lx1, ly1, lz0 ); //Vector<T,3> origin; //IndicatorCuboid3D<T> cuboid2( extend, origin ); //superGeometry.rename( 1,2,cuboid2 ); Vector<T,3> extend; Vector<T,3> origin; // Set material number for inflow extend = {2*converter.getConversionFactorLength(), ly0, lz0}; origin[0] -= converter.getConversionFactorLength()/2.; IndicatorCuboid3D<T> inflow( extend, origin ); superGeometry.rename( 2,3,1,inflow ); // Set material number for outflow origin[0] = lx0 - converter.getConversionFactorLength()*1.5; IndicatorCuboid3D<T> outflow( extend, origin ); superGeometry.rename( 2,4,1,outflow ); // Removes all not needed boundary voxels outside the surface superGeometry.clean(); // Removes all not needed boundary voxels inside the surface superGeometry.innerClean(); superGeometry.checkForErrors(); //superGeometry.print(); superGeometry.getStatistics().print(); clout << "Prepare Geometry ... OK" << std::endl; return superGeometry; }
Could you tell me what could have went wrong in the above implementation?
Thankyou,
Best regards,
Sahil Bhapkarsahilbhapkar30ParticipantHello Adrian,
Thank-you for the reply.
Yes,actually I mean the flow around the cuboid shapes.
As per my above comment, I have described my drag definition at the inlet and outlet. However, I am getting infinite value at the inlet and outlet.
I tried setting the drag definition even for bstep2d/3d (Cuboid Shape geometry) and found similar infinite value for drag coefficient and lift. That is the reason I asked whether Drag force is calculated using Stokes Law. If it is calculating by Stokes Law, the Radius of Curvature in the cuboid geometry would be taken to be infinite.
So, could you please help me to imply the drag and lift definition for cuboid shapes?
Thank-you
sahilbhapkar30ParticipantHello Adrian,
Thank-you for your prompt reply.
When I tried implementing the drag and lift for my inlet and outlet which are in cuboid shape,
SuperLatticePhysDrag3D<T,DESCRIPTOR> drag( sLattice, superGeometry, 3, converter ); // for inlet
SuperLatticePhysDrag3D<T,DESCRIPTOR> drag2( sLattice, superGeometry, 4, converter ); // for outletT dragA[3];
int input1[0];
drag( dragA, input1 );
clout << “; drag_inlet=” << dragA[0] << “; lift_inlet=” << dragA[1] << endl;T dragB[3];
int input2[0];
drag2( dragB, input2 );
clout << “; drag_outlet=” << dragB[0] << “; lift_outlet=” << dragB[1] << endl;I am getting inf value for drag_inlet and drag_outlet and same for lift as well. Could you tell me the reason for this inf value?
I did not understand the meaning of the sentence you said in your comment:
The CuboidGeometry class describes the block decomposition of the simulation domain and not the obstacle geometry of which you want to calculate flow coefficients.
Thank-you
sahilbhapkar30ParticipantHello,
I tried setting the above Boundary conditions and I received the following error.
error: ‘setBounceBackVelocityBoundary’ was not declared in this scope.
What would be the reason?
Thank you,
Sahilsahilbhapkar30ParticipantHello,
As per your comments for the Bouzidi Boundary condition, (especially if the cuboid boundaries align exactly with cell locations) in the above chat,I implemented the offlattice by using the implementation as per the User guide 1.4 version in which I wrote the following code for my boundary. Still I keep getting the error of no boundary found.
off-lattice: sLattice.defineRho(..), sLattice.defineUBouzidi(..).Could you specify this line (w.r.t. setBounceBackVelocityBoundary: You should not need to include any files beyond the olb(2,3).h(h) headers) more clearly?
Thankyou,
Sahil
sahilbhapkar30ParticipantHello Sir,
I did not understand which contact form you were referring to.Thank-you,
Sahilsahilbhapkar30ParticipantHello,
Sir could you give me your email so that I can share the code with you and you could help me with the moving wall boundary?Thank-you,
Sahilsahilbhapkar30ParticipantHello,
I have another question to add to the above question. In my geometry, my moving wall is of the shape of cuboid. As per the literature, the Bouzidi boundary condition can be used only for curved surfaces. So is that the reason that I am getting an error of “No-Boundary found while applying the bouzidi boundary condition for the moving wall. In all the three examples of Bouzidi, aorta3d, cylinder2d/3d , the implementation of the bouzidi is for the curved boundary only.
Thank-you,
Sahilsahilbhapkar30ParticipantHello,
I tried implementing the setBounceBackVelocityBoundary3D given in the src/Boundaries folder. Even I included the implementation of it in the setboundaryconditions3D file. But when I run the code, it keeps giving me the error that the setBounceBackVelocityBoundary3D is not included in the scope of the prepare lattice. Is there anything I am missing to include this boundary in openLB?Regarding, the bouzidi , you are suggesting me to change the resolution right?
Could you tell more about the resolved particle system for the moving wall implementation?
Thank-you,
Sahil
sahilbhapkar30ParticipantHello,
Thank-you for your response.
I tried setting the Bouzidi Boundary condition for my moving wall earlier. However, I kept on getting the error of ([setBouzidiBoundary] ERROR: no boundary found at (16,26,13)). Also, as per the forum discussion in the below link, it says the implementation of Bouzidi boundary condition for the moving wall is not implemented yet. So, has it got implemented for 1.4 version? Could you please help me in implementing the boundary condition for the moving wall?
https://www.openlb.net/forum/topic/moving-boundaries/
In addition, can you give me more information about the “Bounce Back with the velocity correction by Nguyen and Ladd.”?. How to implement it ? It would be a great help.
Thank-you,
Sahil -
AuthorPosts