Skip to content

Reply To: Example issues on Cluster

#6412
jflorezgi
Participant

Hi Adrian, thank you for your reply. I’m working first in a simulation intended to mimic a violent expiratory event resembling a mild cough, so for now I have two coupled lattices (NSLattice and ADLattice) to evolve the flow and temperature field. I’m using a D3Q19 for NSLattice and D3Q7 for ADLattice velocity fields, SmagorinskyForceMRTDynamics and SmagorinskyMRTDynamics are used respectively for the dynamics, and I’m using the SmagorinskyBoussinesqCouplingGenerator3D to couple the two lattices to calculate the buoyancy force (Boussinesq Approx.) in NSLattice and to pass the convective velocity to ADLattice.

The code to load the checkpoint just after the prepareLattice function call is:

// === 4th Step: Main Loop with Timer ===
std::size_t iT = 0;
Timer<T> timer( converter.getLatticeTime( maxPhysT ), superGeometry.getStatistics().getNvoxel() );

// checks whether there is already data of the fluid from an earlier calculation
if ( !(NSLattice.load(“NSChallenge2022Coupled.checkpoint”))){

// if there is no data available, it is generated
timer.start();

for ( ; iT <= converter.getLatticeTime( maxPhysT ); ++iT ) {

// === 5bth Step: Definition of Initial and Boundary Conditions ===
setBoundaryValues( converter, NSLattice, ADLattice, superGeometry, iT );

// === 6th Step: Collide and Stream Execution ===
NSLattice.collideAndStream();
ADLattice.collideAndStream();

NSLattice.executeCoupling();

// === 7th Step: Computation and Output of the Results ===
getResults( NSLattice, ADLattice, cuboidGeometry, converter, iT, superGeometry, timer, file );
}

timer.stop();
timer.printSummary();

delete bulkDynamics;
delete TbulkDynamics;
}

// if there exists already data of the fluid from an earlier calculation, this is used
else{
NSLattice.load(“NSChallenge2022Coupled.checkpoint”);
ADLattice.load(“ADChallenge2022Coupled.checkpoint”);
NSLattice.postLoad();
ADLattice.postLoad();

iT = lastCPTime;
timer.update(iT);

for ( ; iT <= converter.getLatticeTime( maxPhysT ); ++iT ) {

// === 5bth Step: Definition of Initial and Boundary Conditions ===
setBoundaryValues( converter, NSLattice, ADLattice, superGeometry, iT );

// === 6th Step: Collide and Stream Execution ===
NSLattice.collideAndStream();
ADLattice.collideAndStream();
NSLattice.executeCoupling();

// === 7th Step: Computation and Output of the Results ===
getResults( NSLattice, ADLattice, cuboidGeometry, converter, iT, superGeometry, timer, file );
}

timer.stop();
timer.printSummary();

delete bulkDynamics;
delete TbulkDynamics;
}

The checkpoint save is call in getResults function. I’m glad to know that next release is coming soon, I’m trying to build the Outflow boundary conditions (M. Junk and Z. Yang (2008)) to open boundaries but i have some questions, but i think that is better to open a new thread with this topic. Finally, I want to know if in the next release is possible to use a gpu paralelization.

Thanks for your help.