Skip to content

Reply To: simulateWithTwoWayCoupling


Dear 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,