Nicolas
Forum Replies Created
-
AuthorPosts
-
NicolasParticipant
Dear Zhanshi,
1a. you can subtract an object of type SmoothIndicatorSphere3D from an object of type AnalyticalIdentity3D since they are both derived from the class AnalyticalF3D. You can find the respective inheritance diagram (AnalyticalF3D inheritance graph) in our doxygen. Please take a closer look here first for any questions regarding related problems.
1b. As phi is supposed to be defined between -1 and 1, the SmoothIndicatorSphere3D (ranging from 0 to 1) needs to be subtracted twice.
2. Any quantity can be transformed between lattice and physical units anytime by using the conversion factors in our UnitConverter. Those you can find in the UnitConverter log at the start of your simulation or by calling them like getConversionFactorLength(). Plenty of quantities can already directly be calculated by respective calls (UnitConverter functions). In case your quantity is not part of it, just check its dimensions and use the provided conversion factors to convert it in the same manner it is done in the UnitConverter.
Best,
Nicolas
NicolasParticipantHi Frank,
is there any particular reason you changed the original line
T distance2Wall = converter.getConversionFactorLength();
to
T distance2Wall = converter.getLatticeLength(ly0_new/2.);
?
In any case, in your setup this results in a deformed poiseuille profile giving you the impression of a constant value. Just restore the line to its original version and it will probably work the way you intended it to.
Regards,
Nicolas
February 7, 2020 at 10:06 am in reply to: Usage of ParticleDynamics2D::checkAndRemoveEscaped() in dkt2d.cpp #4741NicolasParticipantDear Junwei Guo,
as forwarded from our developer Davide Dapelo, who implemented the function:
ParticleDynamics2D::checkAndRemoveEscaped() removes a particle IF the intersection between the particle’s indicator and the domain’s inner layer is non-empty.
Most likely you misunderstood the function of indicatorF in ParticleDyamics2D’s constructor, since you defined it as the indicator of the domain’s bottom layer (colBase), BUT in fact it should be the whole domain. Following your definition, colBase’s inner layer is just a zero-height layer, and therefore its intersection with any particle indicator is always empty.
The solution to this problem should simply be to change colBase with a whole domain indicator:
Vector orig0(0,0);
Vector ext0(lengthX,lengthY);If that does not work (but it should), you should define a tighter indicator.
Best wishes,
Nicolas
NicolasParticipantDear Junwei Guo,
for now, periodic boundary conditions for HLBM particles are not part of the current Version 1.3r1.
Best Regards,
NicolasNicolasParticipantDear Junwei Guo,
thank you for pointing out this issue. This indeed represents a bug still remaining in version 1.3r1. The addSphere function however, is somewhat redundant to the method suggested in the the example settlingCube3d. Here, an indicator (eg.SmoothIndicatorSphere3D) is created and subsequently added to the particleDynamics via addParticle, which is supposed to yield the same effect.
Best,
NicolasAugust 21, 2019 at 9:35 am in reply to: Printing the relaxation time of each lattice to vtk files #4511NicolasParticipantDear Junwei Guo,
you can print any analytical functor via SuperLatticeFfromAnalyticalF2D. In case a constant value needs to be written an AnalyticalConst2D can be used to provide the respective functor. Even though you are probably not interested in writing a constant lattice relaxation time to every cell, this could be achieved by the following snippet:
AnalyticalConst2D<T, T> anaConstTau( converter.getLatticeRelaxationTime() );
SuperLatticeFfromAnalyticalF2D<T, DESCRIPTOR> tau( anaConstTau, sLattice );
vtmWriter.addFunctor( tau );Best,
Nicolas- This reply was modified 4 years, 8 months ago by Nicolas.
NicolasParticipant1. In general different fluids can be characterized by their density and their kinematic viscosity. While assuming a isothermal fluid to be incompressible, both quantities remain constant throughout the simulation and therefore are used as input parameters for the ‘UnitConverter’ set up.
In the particular case of ‘cylinder2d’ the density (‘physDensity’) is set to 1.0 kg m-3 which indeed is supposed to resemble an air-like fluid. The kinematic viscosity however is not fixed but scales with the cylinder radius and the Reynolds number (Re). This way the Reynolds number can be used as an input parameter in the beginning (‘simulation setup’), which allows for the investigation of different flow regimes. Nevertheless if desired any physical quantity may be set as a fixed input parameter for the ‘UnitConverter’ as well.2. In the example ‘cylinder2d’ a velocity boundary is applied at the inlet and a pressure boundary at the outlet (‘addVelocityBoundary’ and ‘addPressureBoundary’ in ‘prepareLattice’). In order to specify a pressure difference a pressure boundary has to be applied at the inlet as well by replacing the corresponding velocity instruction in ‘prepareLattice’ by
sBoundaryCondition.addPressureBoundary( superGeometry, 3, omega );
sLattice.defineRho( superGeometry, 3, rho);
In order to prevent shocks, a smooth start-up can be added by gradually changing the initialized pressure on either side to the desired (here 0.1 Pa) one. This can be done in ‘setBoundaryValues’ by defining a functor which has the information of the density corresponding to the pressure in lattice units by
AnalyticalConst2D<T,T> rho(converter.getLatticeDensityFromPhysPressure(.1*frac[0]);
-
AuthorPosts