Rookie
Forum Replies Created
-
AuthorPosts
-
RookieParticipant
Dear Jan,
I understand your explanation, I also wanted to use 2 lattices at the beginning, so I set this at the beginning;int overlap = 2. * converter.getConversionFactorLength(); and saw the error report that it must be greater than 1, so I changed it to 2, here it is 2 lattices.
My result is not out yet, I will tell you the first time after it is out, you can also check if there is any problem with my above parameter Settings, I have chosen a local way for coupling, I am not sure whether the local is more stable, and then I will try other results to share here.
Best regards,
RookieDecember 7, 2023 at 9:25 am in reply to: Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method) #7992RookieParticipantDear jan,
I modified some declaration and reference parameter errors in periodicBoundary3D.h, so I can run this cycle boundary, I don’t know if I modified it correctly, I will analyze the results later to tell you this.I made the following changes:
SuperGeometry<T,3>& sg,
olb::Vector<T, 3> _minPhys, _maxPhys, _extend;template<typename T, template<typename U> class PARTICLETYPE>
PeriodicBoundary3D<T, PARTICLETYPE>::PeriodicBoundary3D(
SuperGeometry<T,3>& sg, bool x, bool y, bool z) : Boundary3D<T, PARTICLETYPE>(),
_minPhys(sg.getStatistics().getMinPhysR(2)),
_maxPhys(sg.getStatistics().getMaxPhysR(2)),
_extend(_maxPhys – _minPhys),Best regards,
RookieRookieParticipantDear Jan,
I also wanted to remove const, but I don’t know if it will affect the rest of the converter. Like you said, I changed this place to:UnitConverterFromResolutionAndLatticeVelocity<T, DESCRIPTOR> converter
And then I changed it based on the error report:int overlap = 2;The original code had such a definition: supParticleSystem.setOverlap(2. * converter.getConversionFactorLength());
I understand it as overlapping area, can you explain the meaning of this in detail, when I analyze the data in the fluid part, the two layers of data in the middle of the Z-axis will be repeated, I initially thought it was caused by parallel Settings, I don’t know what the correlation is, and I set it equal to 2 correctly?
Best regards,
RookieRookieParticipantDear Jan,
I am very glad to continue to communicate with you about this aspect of learning. I’m learning this part of the code, and the lack of explanation really bothers me. If I implement this I will be happy to share it here. But now I want to add this two coupling and how to set the parameters that it needs.
template<typename T, template<typename U> class PARTICLETYPE>
void SuperParticleSystem3D<T, PARTICLETYPE>::simulateWithTwoWayCoupling_Davide ( T dT,
ForwardCouplingModel<T,PARTICLETYPE>& forwardCoupling,
BackCouplingModel<T,PARTICLETYPE>& backCoupling,
int material, int subSteps, bool resetExternalField, bool scale )I thought it should be set up like the addforce, so I added this line of code like this, I’m not sure if I added the right position (after supParticleSystem.addForce or after supParticleSystem.simulate).I am also not sure on what basis should I judge the choice between Local and SmoothingFunctional.
If I set up the following code, it will report an error saying that converter cannot be passed because of a constant, and I don’t know how to continue to modify it.
auto dragModel = std::make_shared<SchillerNaumannDragModel<T, DESCRIPTOR, PARTICLE>>(converter);
LaddForwardCouplingModel<T, DESCRIPTOR, PARTICLE> forwardCoupling(converter, sLattice, superGeometry, dragModel);
int overlap = 2. * converter.getConversionFactorLength();
LocalBackCouplingModel<T, DESCRIPTOR, PARTICLE> backCoupling(converter, sLattice, superGeometry, overlap);
int subSteps = converter.getLatticeTime(particleMaxPhysT);
supParticleSystem.simulateWithTwoWayCoupling_Mathias ( dT, forwardCoupling, backCoupling, 1, subSteps, false, true);Best regards,
RookieDecember 5, 2023 at 2:41 pm in reply to: Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method) #7979RookieParticipantDear jan,
What you said is quite reasonable, and I will revise it according to your suggestion. Thank you for remembering my question.
Best regards,
Rookie- This reply was modified 2 years, 8 months ago by Rookie.
November 29, 2023 at 10:40 am in reply to: Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method) #7960RookieParticipantDear mathias,
As you said, I am trying to combine the two codes together, but in my opinion, it is really difficult to incorporate the collision rebound between particles and wall in the old code into the new code, as Jan said. So I’m now trying to add ParticleManager to the old code, because your idea is to modify some of the source code in the new code? This may be a little difficult for me, so how do I add the following code to the old code:
ParticleManager<T, DESCRIPTOR, PARTICLETYPE> particleManager(
supParticleSystem, superGeometry, sLattice, converter, {true, true, false});Best regards,
RookieRookieParticipantI’ve solved the problem, and if I’m right, it looks like this:
SuperLatticeInterpPhysVelocity3D<T, DESCRIPTOR> getVel(sLattice, converter);
T dynVisc = converter.getPhysViscosity() * converter.getPhysDensity();
T physDensity = converter.getPhysDensity();auto schillerNaumannDragForce = std::make_shared<SchillerNaumannDragForce3D<T, PARTICLE, DESCRIPTOR>>(getVel, dynVisc, physDensity);
supParticleSystem.addForce(schillerNaumannDragForce);November 28, 2023 at 3:34 am in reply to: Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method) #7954RookieParticipantDear Fedor,
I understand the operation you mentioned, because I have asked Jan about particle Settings, and I want to set the collision rebound between particles and the wall, as well as the periodicity of particles. Jan told me that I can only set the collision between particles and the wall in version 1.5, and I know that you can set the ParticleManager in version 1.6. So how do you think I can do all of this at the same time.
Best regards,
RookieNovember 27, 2023 at 2:28 pm in reply to: Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method) #7949RookieParticipantDear Fedor,
I understand that you want to add the periodicity vector (false,true) at the end of the ParticleManager, But if it is version 1.5 under “/ bifurcation3d eulerLagrange” in the particle set how to impose periodic boundary particles, because there is no ParticleManager, and I set also report an error like this:
auto materialperiodicBoundary = std::make_shared
< PeriodicBoundary3D<T, PARTICLE>
> (superGeometry, true, true, false);
supParticleSystem.addBoundary(materialperiodicBoundary);Best regards,
RookieRookieParticipantDear jan,
Some literatures I read is to use the method of Particle-Source-In Cell to realize the two coupling of particles and fluids, I do not know whether it is implemented in openlb. Because I find this folder (/ olb 1.6 r0 / SRC/particles/subgrid3DLegacyFramework/twoWayCouplings), my guess is that to achieve the role of the grid granule on grid is achievable. But I don’t have an example to refer to how to add the code I need. I really beg for your help, which is really important to me.
Best regards,
RookieRookieParticipantDear jan,
I did not get used to the new particle system and did not find some features implemented in version 1.5. If the 1.5 version of the code is used, how to implement the effect of the particles on the lattice?
Best regards,
RookieRookieParticipantDear jan,
Have a good trip, I have added gravity, but what I want to achieve next is to achieve the particle collision with the wall, rather than capturing the particle, and can you use the point particle method to achieve the particle effect on the fluid, such as adding the particle effect on the lattice:
particleManager.execute<
couple_lattice_to_particles<T,DESCRIPTOR,PARTICLETYPE>,
process_dynamics<T,PARTICLETYPE>,
update_particle_core_distribution<T,PARTICLETYPE>,
apply_gravity<T,PARTICLETYPE>,
couple_particles_to_lattice<T,DESCRIPTOR,PARTICLETYPE>
>();Best regards,
Rookie -
AuthorPosts
