Skip to content

Re: Operate the whole vector field

#2635
albert.mink
Moderator

I 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 );

}

—-