Jijo
Forum Replies Created
-
AuthorPosts
-
JijoParticipant
Hello OpenLB community,
An update for the above question. when I try to use any shape other than circle in 2D, a rotation matrix is required. How can I implement a rotation matrix? A bit confused here.
Regards,
JijoParticipantHello Javad,
I am not a developer but I do not think such complex problem is yet to be addressed in OpenLB. In addition, OpenLB does not use Discrete Element Method (DEM) to handle the physics of solid particles. They utilize the Homogenized LBM. You can start by looking into the examples of (particles).
JijoParticipantDear Jan,
Thank you for your reply. I appreciate your constant support and help. The problem I am having is that the fluid itself is not flowing upward due to natural convection and I think such issue is due to the force field.
It seems that the porousparticleBGK dynamics does not contain a force field and I believe that buoyancy forces are coupled using Boussinesq forces by the Guo forcing scheme. What do you think I should do in this case?
Regards,
September 7, 2023 at 9:33 am in reply to: Heat transfer liquid-solid and heat conduction in solids #7733JijoParticipantDear Fedor,
What about if I want to remove the material number after the time step?
September 7, 2023 at 12:16 am in reply to: Heat transfer liquid-solid and heat conduction in solids #7731JijoParticipantDear Fedor,
What I want to do is to avoid using (getBlock). So I am thinking to obtain concrete cell number using getCellId(iX,iY)) and then use Cell (BlockLattice< T, TDESCRIPTOR > &block, std::size_t CellId) to set rho using [olb::Cell< T, TDESCRIPTOR >::defineRho(scalar)]. All of these are in the setTemperature function that I have written. However, it seems that I am missing something. What is the BlockLattice here?
Your help is really needed and appreciated.
ThanksSeptember 6, 2023 at 12:23 pm in reply to: Heat transfer liquid-solid and heat conduction in solids #7729JijoParticipantDear Fedor,
Unfortunately I am bound by time so waiting 9 months is not an option. Isn’t there any other way to force the cell to have a certain temperature? What about using (defineRho(scalar)) into a certain iX and iY?
Regards
JijoSeptember 6, 2023 at 9:07 am in reply to: Heat transfer liquid-solid and heat conduction in solids #7726JijoParticipantDear Fedor,
I appreciate your help.
This is my config file:
///
# Example build config for OpenLB using GNU C++ and OpenMPI
#
# Usage:
# – Copy this file to OpenLB root asconfig.mk
# – Runmake clean; make
# – Switch to example directory, e.g.examples/laminar/cavity3dBenchmark
# – Runmake
# – Start the simulation usingmpirun ./cavity3d
#
# Usage of the Intel C++ compiler is recommended for Intel CPU clusters.
# Seeconfig/cpu_simd_intel_mpi.mk
for guidance.CXX := mpic++
CC := gcc# The
march=native
flag enables AVX2 / AVX-512 instructions if available.
# However, actually using them requires adding theCPU_SIMD
platform.
#
# Note that on some clusters the head node for compilation may differ from
# the compute nodes, necessitating manual selection of the correct
# architecture / SIMD flags. Alternatively, compilation at the start of
# the HPC jobs is a common option.
CXXFLAGS := -O3 -Wall -march=native -mtune=native
CXXFLAGS += -std=c++17# HYBRID mode is also possible but more complex to run correctly
PARALLEL_MODE := MPI# optional MPI and OpenMP flags
OMPFLAGS := -fopenmp# SIMD support may optionally be enabled by adding the
CPU_SIMD
platform
PLATFORMS := CPU_SISD # CPU_SIMDFLOATING_POINT_TYPE := double
USE_EMBEDDED_DEPENDENCIES := ON
// END ///////////////////////////////////////////////
I do not get why does this not work. I have tried the Squarecavity2d Example and it loops around only 1. Is there any other way to set a certain cell a source(Temperature)? Pretty much stuck at this point from last time.
Thanks,
JijoJijoParticipantHello Jan,
Thank you for your comprehensive explanation. I now understand the implementation.I have one final question that I hope you can help me with. I am currently running a convective flow with resolved particles. However, I constantly come across a problem with the particles deforming into the wall although I am using the discrete contact model you have implemented in OpenLB. I have attached a picture for your information:
Before: https://ibb.co/VgdJJ9m
After: https://ibb.co/3B7Yc0KCode snippet:
particleSystem.defineDynamics<VerletParticleDynamics<T,PARTICLETYPE>>();
// Create solid boundaries for particle interaction
std::vector<SolidBoundary<T, NSDESCRIPTOR::d>> solidBoundaries;solidBoundaries.push_back( SolidBoundary<T, NSDESCRIPTOR::d>(std::make_unique<IndicInverse<T, NSDESCRIPTOR::d>>(cuboid, cuboid.getMin()-5 * converter.getPhysDeltaX(),cuboid.getMax()+5 * converter.getPhysDeltaX()), 2, wallContactMaterial));
// Create objects for contact treatment
ContactContainer<T, PARTICLECONTACTTYPE, WALLCONTACTTYPE> contactContainer;
// Generate lookup table for contact properties
ContactProperties<T, 1> contactProperties;
contactProperties.set(particleContactMaterial, wallContactMaterial,
evalEffectiveYoungModulus(youngsModulus, youngsModulus,
poissonRatio, poissonRatio),
dampingConstant, coefficientKineticFriction, coefficientStaticFriction);// Set contact material
for (std::size_t iP = 0; iP < particleSystem.size(); ++iP) {
auto particlesc = particleSystem.get(iP);
setContactMaterial(particlesc, particleContactMaterial);
}//Check ParticleSystem
particleSystem.checkForErrors();for ( std::size_t iT = 0; iT < converter.getLatticeTime( maxPhysT ); ++iT ) {
setBoundaryValues(converter, NSlattice,ADlattice, iT, superGeometry);
// Execute particle manager
particleManager.execute<
couple_lattice_to_particles<T,NSDESCRIPTOR,PARTICLETYPE>,
apply_gravity<T,PARTICLETYPE>
>();// Calculate and apply contact forces
processContacts<T, PARTICLETYPE, PARTICLECONTACTTYPE, WALLCONTACTTYPE, ContactProperties<T, 1>>(
particleSystem, solidBoundaries, contactContainer, contactProperties,
superGeometry, contactBoxResolutionPerDirection);// Solve equations of motion
particleManager.execute<process_dynamics<T,PARTICLETYPE>>();// Couple particles to lattice (with contact detection)
coupleResolvedParticlesToLattice<T, NSDESCRIPTOR, PARTICLETYPE, PARTICLECONTACTTYPE, WALLCONTACTTYPE>(
particleSystem, contactContainer, superGeometry, NSlattice, converter, solidBoundaries);Any idea why such issue occur? You support is appreciated.
Regards,JijoParticipantHello Jan,
Thank you for your feedback it has been very useful. Just one question I have with the dkt2d example is regarding this part of the code:
//
solidBoundaries.push_back( SolidBoundary<T, DESCRIPTOR::d>(
std::make_unique<IndicInverse<T, DESCRIPTOR::d>>(
cuboid, cuboid.getMin() – 5 * converter.getPhysDeltaX(),
cuboid.getMax() + 5 * converter.getPhysDeltaX()), 2, wallContactMaterial));//
What I understand is that you gave material number 2 (wall) the properties of wallcontactMaterial but what arguments are you providing here (std::make_unique<IndicInverse<T, DESCRIPTOR::d>>). Also what if I have couple material numbers that I want to consider as walls in that case should I extend the vectorin the same manner?
Thanks,
July 21, 2023 at 12:44 pm in reply to: Heat transfer liquid-solid and heat conduction in solids #7643JijoParticipantDear Dr. Mathias,
I did that and the simulation is running. The problem is with the simulation output where the loop only iterates around the cuboid ranked 0 instead of the other 9 cuboids.
I think problem lies with the following snippet code:
Vector<T,2> extendStep( lengthStep, heightStep );
Vector<T,2> originStep( 0, 0);
std::shared_ptr<IndicatorF2D<T>> step = std::make_shared<IndicatorCuboid2D<T>>( extendStep, originStep );
CuboidGeometry2D<T> cuboidGeometry( *(channel-step), converter.getConversionFactorLength(), 10 );If I change 10 to 1, the output is correct.
Best regards,
July 19, 2023 at 3:18 pm in reply to: Heat transfer liquid-solid and heat conduction in solids #7637JijoParticipantDear Fedor,
It seems that I am missing something here. I am running the simulation using the command (mpirun -np 10 ./bstep) which will divide the domain into 10 cuboids. but the above loop only iterates through iC=0.
I apologize for the question but I am genuinely confuse.
Best regards,
July 19, 2023 at 10:53 am in reply to: Heat transfer liquid-solid and heat conduction in solids #7635JijoParticipantDear Fedor,
I have read your response on setting the value of rho to each cell. That is exactly what I need and I am thankful for your help but it seems that this function does not work for parallel running. Does it? The value of iC is always zero and does not increase further. Any help on that would really be appreciated.
Best regards,
JijoParticipantDear Dr. Mathias,
I appreciate your reply but I could not find any example on forced convection flow. So I have combined two examples together. My main problem is that the velocity profile weakens during the run. by that I mean it decreases. My analysis is a transient so it must stay consistent throughout the run. Any suggestions on that?
regards
JijoParticipantDear Dr. Mathias,
I used the interpolated velocity and pressure for the inlet and outlet, respectively. For the walls, I used bounce back for the NSlattice and drichlet (constant T) for the ADlattice.
Sincerely,
AnasJijoParticipantDear community,
Quick note, I also notice that the velocity is decreasing gradually. I wonder why? Maybe this is the main cause. I used different BCs, reduced the time step and the grid length but the reducing effect is still there.
Sincerely,
Anas -
AuthorPosts