Re: [Yade-users] [Question #691324]: Flow inside a cylinder pipe

2020-06-17 Thread Deepak
Question #691324 on Yade changed:
https://answers.launchpad.net/yade/+question/691324

Status: Open => Answered

Deepak proposed the following answer:
Hello, 
Yes it should be possible to perform such a simulation. You can create a pipe 
geometry mesh it and set the appropriate boundary conditions in openfoam. In 
the yade side, use the same pipe geometry (.stl file) generate a facet body 
from this stl, generate spheres at the interior of  the cylinder surface and 
set  the exact boundary conditions you have in openfoam. 

For example : for a fully developed pipe flow (i,e. the velocity profile does 
not vary along the axis), you would require periodic boundary conditions  at 
the 'inlet' and 'outlet' surfaces (along the axial direction), and wall 
boundary condition over the cylinder surface. 
In yade, this same setup has to be maintained, perioidic bcs in the axial 
direction and solid wall/facet to represent the cylinder surface,  and generate 
spheres using the spherePack utility with the cylinder as the preidcate.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #690494]: How to simulate the dispersion process of agglomerated particles with YADE and Open FOAM?

2020-05-10 Thread Deepak
Question #690494 on Yade changed:
https://answers.launchpad.net/yade/+question/690494

Deepak posted a new comment:
Hello,

 >  1. At first, primary particles are agglomerated into a clump due to
van der wall force,

I think you will have to include a formulation for the Van der Waals's
forces in an existing contact law, for instance you can check
Law2_ScGeom6D_CohFrictPhys_CohesionMoment  in [1] and see how to modify
it.

For points 2,3 & 4  I think you can directly simulate this in Yade for
'dry' situations, i.e. without the fluid, there's an example of a ball-
mill simulation in [2]. For generating particles (spheres and clumps)
with radii distribution you can check the pack module[3] of Yade, there
are several examples showing the use of this module in the documentation
and the examples[4], [5] (see lines 58-75),

> Can I couple YADE for DEM and 'Open FOAM' for CFD simulation?

As long as you don't require a dynamic/moving mesh, it should be
possible to simulate it. Considering the ball-mill example, you can
setup the exact case in OpenFOAM, and use the rotatingWallVelocity
boundary for the cylinder surface.

[1]https://yade-dem.org/wiki/ConstitutiveLaws
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/mill.py
[3]https://yade-dem.org/doc/yade.pack.html#yade.pack.randomDensePack
[4]https://yade-dem.org/doc/user.html
[5]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/triax-tutorial/script-session1.py

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #689000]: Yade simulation freezes

2020-02-27 Thread Deepak
Question #689000 on Yade changed:
https://answers.launchpad.net/yade/+question/689000

Status: Open => Answered

Deepak proposed the following answer:
I see, 
for the hanging porblem, you can set a constant dt, O.dt = 1e-05, and use 
sim.irun(10), (with the original sim.irun) function, also comment on the 
GlobalStiffnessTimeStepper. 

Are the same boundary conditions set in OpenFOAM too, that is you have set 
walls with no slip boundary condition, (the default case is periodic)? 
Can you share the blockMeshDict files, files in 0, system and constant 
directory?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #689000]: Yade simulation freezes

2020-02-27 Thread Deepak
Question #689000 on Yade changed:
https://answers.launchpad.net/yade/+question/689000

Status: Open => Answered

Deepak proposed the following answer:
the endTime in controlDict is 1.0; this has tho be the same in your yade
script:

what you can modify the function irun(self):

 def irun(self,endTime):
  if (O.time <= endTime): 
 O.step() 

and calling it as :

sim.irun(1)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #689000]: Yade simulation freezes

2020-02-26 Thread Deepak
Question #689000 on Yade changed:
https://answers.launchpad.net/yade/+question/689000

Status: Open => Answered

Deepak proposed the following answer:
Okay, this seems because of the mismatch in the simulation endtimes, you
can post (copy paste) your yade script and the openfoam controlDict
file and I can suggest how to fix it.

Can you be precise about the stability issue you are facing ?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #689000]: Yade simulation freezes

2020-02-26 Thread Deepak
Question #689000 on Yade changed:
https://answers.launchpad.net/yade/+question/689000

Status: Open => Answered

Deepak proposed the following answer:
Hello,

Can you provide the following information :

 - the scripts you are runing. 
 - version of yade you are using. 
 - the openfoam solver you are using, (note the pimpleFoamYade solver requires 
some fixes)

Have you made sure that the simulation end time is the same in Yade and
Openfoam ? ( if not one of them will be hanging).

Thanks,

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #685676]: Compilation error - yadeWrapperAny idea

2019-11-07 Thread Deepak
Question #685676 on Yade changed:
https://answers.launchpad.net/yade/+question/685676

Status: Open => Answered

Deepak proposed the following answer:
Hi,

> return PyMemoryView_FromMemory  ...  is from python3[1], using python3
instead of 2.7 should fix it it.

[1]https://docs.python.org/3/c-api/memoryview.html

On Thu, Nov 7, 2019 at 10:18 AM Luc Scholtès <
question685...@answers.launchpad.net> wrote:

> New question #685676 on Yade:
> https://answers.launchpad.net/yade/+question/685676
>
> Hi all,
>
> I just downloaded the latest trunk from gitlab and got this error message
> at 97% compilation:
>
> [ 97%] Linking CXX shared library lib/x86_64-linux-gnu/_packPredicates.so
> /media/scholtes/sdb/yade/sources/trunk/trunk/py/wrapper/yadeWrapper.cpp:
> In member function ‘PyObject* yade::pyOmega::bufferFromIntrsct(const
> boost::shared_ptr&, unsigned int, unsigned int, bool)’:
> /media/scholtes/sdb/yade/sources/trunk/trunk/py/wrapper/yadeWrapper.cpp:728:136:
> error: ‘PyMemoryView_FromMemory’ was not declared in this scope
> return PyMemoryView_FromMemory((char*)
> (subD->intersections[rank].data()),
> subD->intersections[rank].size()*sizeof(Body::id_t),PyBUF_WRITE);}
>
>   ^
> /media/scholtes/sdb/yade/sources/trunk/trunk/py/wrapper/yadeWrapper.cpp:731:145:
> error: ‘PyMemoryView_FromMemory’ was not declared in this scope
> return PyMemoryView_FromMemory((char*)
> &(subD->mirrorIntersections[rank][0]),
> subD->mirrorIntersections[rank].size()*sizeof(Body::id_t),PyBUF_WRITE);}
>
>^
> [ 97%] Built target _packPredicates
> py/CMakeFiles/wrapper.dir/build.make:62: recipe for target
> 'py/CMakeFiles/wrapper.dir/wrapper/yadeWrapper.cpp.o' failed
>
> I am on Ubuntu 16.04.06 and here is what cmake returned:
>
> -- The C compiler identification is GNU 5.4.0
> -- The CXX compiler identification is GNU 5.4.0
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- Version is set to 2019-11-05.git-35899c7
> -- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0
> -- GCC Version >= 4.8. Adding -save-temps
> -- GCC Version >= 4.9. Adding -fstack-protector-strong
> -- Found Eigen3: /usr/include/eigen3 (Required is at least version
> "2.91.0")
> -- Log filtering: enabled
> -- Enabling boost::log library and DEBUG=OFF. Logging will work nicely,
> backtraces will not have debug info, files will be small.
> Loop on the following python versions and check available
> dependencies:3.8;3.7;3.6;3.5;3.4;3.3;3.2;3.1;3.0;2.7;2.6
> -- Found PythonInterp: /usr/bin/python (found version "2.7.12")
> -- Found PythonInterp: /usr/bin/python3.5 (found version "3.5.2")
> Python version 3.5.2 found, try to import dependencies...
> -- Found NumPy: version "1.11.0"
> /usr/lib/python3/dist-packages/numpy/core/include
> -- Found IPython: /usr/lib/python3/dist-packages/IPython
> -- Found matplotlib: /usr/lib/python3/dist-packages/matplotlib
> -- Found pygraphviz: /usr/lib/python3/dist-packages/pygraphviz
> -- Found Xlib: /usr/lib/python3/dist-packages/Xlib
> -- Found minieigen: /usr/lib/python3/dist-packages/
> minieigen.cpython-35m-x86_64-linux-gnu.so
> -- Could NOT find future (missing:  PY_future)
> Failed to import dependencies for Python version 3.5.2. NOT FOUND:future
> -- Found PythonInterp: /usr/bin/python (found version "2.7.12")
> -- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.12")
> Python version 2.7.12 found, try to import dependencies...
> -- Found NumPy: version "1.11.0"
> /usr/lib/python2.7/dist-packages/numpy/core/include
> -- Found IPython: /usr/lib/python2.7/dist-packages/IPython
> -- Found matplotlib: /usr/lib/python2.7/dist-packages/matplotlib
> -- Found pygraphviz: /usr/lib/python2.7/dist-packages/pygraphviz
> -- Found Xlib: /usr/lib/python2.7/dist-packages/Xlib
> -- Found minieigen: /usr/lib/python2.7/dist-packages/minieigen.so
> -- Found future: /usr/lib/python2.7/dist-packages/future
> -- Found past: /usr/lib/python2.7/dist-packages/past
> -- Found Tkinter: /usr/lib/python2.7/lib-tk/Tkinter.pyc
> --   Boost_VERSION: 105800
> --   Boost_LIB_V

Re: [Yade-users] [Question #684746]: DEM-CFD point force coupling vs volume averaged coupling

2019-10-07 Thread Deepak
Question #684746 on Yade changed:
https://answers.launchpad.net/yade/+question/684746

Status: Open => Answered

Deepak proposed the following answer:
Hi,

In the simple point force coupling, the hydrodynamic force formulation
is derived from the Stokes drag equation, this is valid when the
Reynolds number   at the particle scale  and the Stokes number is < 1,
which means the inertial fluid forces are negligible compared to the
viscous drag force (doesn't matter if the flow is turbulent or not).
Moreover, we consider the 'suspension' to be dilute, i.e. the volume
fraction of the particles are  < 1-3%

In the case of Re (at the particle scale) or if the stokes number of the
particle  is  1 or more,  or in case of 'dense suspensions ', where the
volume fraction is higher, the inertial effects have to be considered.
For this case one has to use the vol. averaged approach.

Note : In both the cases, the particle size has to be smaller than the
grid cell size.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-09-14 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Deepak proposed the following answer:
Hello,

The simulation hangs because Yade  runs for 5000 timesteps and it exits
:

if __name__=="__main__":
sim = simulation()
sim.steprun()
sim.irun(5000) #run 5000 iteration and wait ---> this line.
fluidCoupling.killMPI()

You need to set the same end time for the yade part as well (0.05), you can
do it like this in the irun function :
  def irun(self,time):
  while (O.time <= time):
O.step()

sim.irun(0.05)

or you can set the O.dt and the corresponding number of iterations.

We do not have the interactivity of Yade in the coupling, i,e. to run for
few timesteps, pause and inspect and change stuff..

Note : even after the simulation has finished running , there is a chance
of hanging, if you see the message "Finalising parallel run" it means
everything is okay.



On Sat, Sep 14, 2019 at 7:17 AM Anqi H 
wrote:

> Question #683336 on Yade changed:
> https://answers.launchpad.net/yade/+question/683336
>
> Anqi H posted a new comment:
> Hi Deepak,
>
> I have attached the script and the txt file that has the particle
> positions and radius. The original txt file has about 3900 particles,
> I've tried running with 20 particles and the program hangs at around the
> same timestep. I also added the code to reset the interaction radius,
> now the program hangs at 0.027s still with small courant number. Can you
> please help me have a look? Thank you.
>
> from __future__ import print_function
> import sys
> from yadeimport import *
> from yade.utils import *
> from yade import ymport
>
> initMPI()   #Initialize the mpi environment,
> always required.
> fluidCoupling = yade.FoamCoupling(); #Initialize the engine
> fluidCoupling.getRank();#part of Initialization.
>
>
> #example of spheres in shear flow : two-way point force coupling
> class simulation():
>
>   def __init__(self):
>
> O.periodic = True;
>
> #proppant properties
> FrictAng_p = 0.9
> Density_p = 2650
> Young_p = 100e6
> TensileStr_p=3000
> Cohesion_p=3000
>
> proppant =
> JCFpmMat(type=2,young=Young_p,frictionAngle=FrictAng_p,density=Density_p,tensileStrength=TensileStr_p,cohesion=Cohesion_p,label='proppant')
>
> O.materials.append(proppant)
>
> proppant_assembly =
> O.bodies.append(ymport.textExt('prop.txt','x_y_z_r',shift=Vector3(0,0,0),scale=1,material=proppant,color=(1.00,0.67,0.50)))
> print ('length of bodies proppant '+str(len(O.bodies)))
>
> for b in proppant_assembly:
>   O.bodies[b].groupMask=2
>   O.bodies[b].dynamic = False
>   O.bodies[b].state.vel=(0, 0, 0)
>   if O.bodies[b].state.pos[0] < 0:
> print("found it ")
> O.bodies.erase(b)
>
> sphereIDs = [b.id for b in O.bodies if (type(b.shape)==Sphere)]
> #coupling engine settings
> fluidCoupling.setNumParticles(len(sphereIDs))
> fluidCoupling.setIdList(sphereIDs)
> fluidCoupling.isGaussianInterp=False;  #use pimpleFoamYade for
> gaussianInterp
>
> # Integrator
> newton=NewtonIntegrator(damping=0.0, gravity = (0.0 ,0.0, 0.0))
>  # add small damping in case of stability issues.. ~ 0.1 max, also
> note : If gravity is needed, set it in constant/g dir.
>
>
> O.engines=[
>   ForceResetter(),
>   InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.2,
> label="bols"),Bo1_Facet_Aabb()], allowBiggerThanPeriod=True),
>   InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.2,
> label="ig2s"),Ig2_Facet_Sphere_ScGeom()],
> [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
>
> [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='lawFunctor')]
>   ),
>   GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.7, label = "ts"),
> fluidCoupling, #to be called after timestepper
> PyRunner(command='sim.printMessage()', iterPeriod= 1000,
> label='outputMessage'),
>   newton,
> VTKRecorder(fileName='yadep/3d-vtk-',mask =
> 2,recorders=['spheres','colors'],iterPeriod=1000)
> ]
>
>
>   def printMessage(self):
>  print("YADE-ITER = " + str(O.iter) +"
> **")
>  if O.iter == 4000:
>  maxVel = 0.05
>  for b in O.bodies:
>  if type(b.shape)==Sphere:
>  bodyVel = abs(b.state.vel.norm())
>  if bodyVel > maxVel:
>  raise ValueError("Body velocity exceeds imposed she

Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-09-13 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Deepak proposed the following answer:
hi,
can you send the yade script as well?


On Fri, Sep 13, 2019 at 3:57 PM Anqi H 
wrote:

> Question #683336 on Yade changed:
> https://answers.launchpad.net/yade/+question/683336
>
> Anqi H posted a new comment:
> Hi Deepak,
>
> Thank you for the links. I've made deltaT 1/10 of the previous value, It
> now stalls at 0.01468s while both courant and max courant number is less
> than 0.5.
>
> Time = 0.01478
>
> Courant Number mean: 0.00188364 max: 0.00654247
> smoothSolver:  Solving for Ux, Initial residual = 0.000895276, Final
> residual = 3.99666e-07, No Iterations 1
> smoothSolver:  Solving for Uy, Initial residual = 0.0012464, Final
> residual = 5.33346e-07, No Iterations 1
> smoothSolver:  Solving for Uz, Initial residual = 0.00136997, Final
> residual = 3.99407e-07, No Iterations 1
> DICPCG:  Solving for p, Initial residual = 0.000356892, Final residual =
> 1.69725e-05, No Iterations 9
> DICPCG:  Solving for p, Initial residual = 1.69772e-05, Final residual =
> 7.49094e-07, No Iterations 10
> DICPCG:  Solving for p, Initial residual = 7.49094e-07, Final residual =
> 7.49094e-07, No Iterations 0
> time step continuity errors : sum local = 6.37045e-12, global =
> -2.646e-14, cumulative = 1.25224e-08
> DICPCG:  Solving for p, Initial residual = 2.68288e-06, Final residual =
> 6.77363e-07, No Iterations 2
> DICPCG:  Solving for p, Initial residual = 6.77362e-07, Final residual =
> 6.77362e-07, No Iterations 0
> DICPCG:  Solving for p, Initial residual = 6.77362e-07, Final residual =
> 6.77362e-07, No Iterations 0
> time step continuity errors : sum local = 5.76044e-12, global =
> -8.4556e-13, cumulative = 1.25216e-08
> ExecutionTime = 128.46 s  ClockTime = 129 s
>
> ControlDict:
> /**- C++
> -*--*\
>   = |
>   \\  /  F ield | OpenFOAM: The Open Source CFD Toolbox
>\\/   O peration | Website:  https://openfoam.org
> \\  /A nd   | Version:  dev
>  \\/ M anipulation  |
>
> \*---*/
> FoamFile
> {
> version 2.0;
> format  ascii;
> class   dictionary;
> location"system";
> object  controlDict;
> }
> // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * //
>
> application icoFoam;
>
> startFrom   latestTime;
>
> startTime   0;
>
> stopAt  endTime;
>
> endTime 0.05;
>
> deltaT  0.05;
>
> writeControltimeStep;
>
> writeInterval   20;
>
> purgeWrite  0;
>
> writeFormat ascii;
>
> writePrecision  6;
>
> writeCompression off;
>
> timeFormat  general;
>
> timePrecision   6;
>
> runTimeModifiable true;
>
>
> //
> * //
>
> fv solution:
> /**- C++
> -*--*\
>   = |
>   \\  /  F ield | OpenFOAM: The Open Source CFD Toolbox
>\\/   O peration | Website:  https://openfoam.org
> \\  /A nd   | Version:  dev
>  \\/ M anipulation  |
>
> \*---*/
> FoamFile
> {
> version 2.0;
> format  ascii;
> class   dictionary;
> location"system";
> object  fvSolution;
> }
> // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * //
>
> solvers
> {
> p
> {
> solver  PCG;
> preconditioner  DIC;
> tolerance   1e-06;
> relTol  0.05;
> }
>
> pFinal
> {
> $p;
> relTol  0;
> }
>
> U
> {
> solver  smoothSolver;
> smoothersymGaussSeidel;
> tolerance   1e-05;
> relTol  0;
> }
> }
>
> PISO
> {
> nCorrectors 2;
> nNonOrthogonalCorrectors 2;
> }
>
>
> //
> * //
>
> fv scheme:
> /**- C++
> -*--*\
>   = |
>   \\  /  F ield | OpenFOAM: The Open Source CFD Toolbox
>\\/   O peration | Website:  https://openfoam.org
> \\  /A nd  

Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-09-13 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Deepak proposed the following answer:
 I've noticed that the max Courant No. is 3.7703, that doesn't look
good...have you tried decreasing the time step in Yade?

On Fri, Sep 13, 2019 at 11:36 AM Deepak Kn 
wrote:

> Hi,
> I need to have a look at the case, boundary conditions and things to
> identify why this happens (my best bet is bad physics/numerical settings),
> paraFoam can be used to view parallel cases, did you have a look into the
> openfoam documentation/coupling documentation? The methods to post process
> parallel
> cases are there ..
>
> https://cfd.direct/openfoam/user-guide/v6-paraview/
> https://yade-dem.org/doc/FoamCoupling.html#post-processing
>
> On Fri, Sep 13, 2019 at 11:09 AM Anqi H <
> question683...@answers.launchpad.net> wrote:
>
>> Question #683336 on Yade changed:
>> https://answers.launchpad.net/yade/+question/683336
>>
>> Status: Answered => Open
>>
>> Anqi H is still having a problem:
>> Hi Deepak,
>>
>> I'm running the same simulation with icoFoam for 0.05s, the particles
>> are defined in fluidCouplingIDList and dynamic is disabled. The fluid
>> case without the particles converges in openFoam, but after the
>> particles are included, the simulation hangs after 0.01275s. I've been
>> having trouble understanding why the program hangs here as the courant
>> number is smaller than 0.5. The terminal output is copied to this post.
>> Another question is about inspecting p,U properties of the fluid cells,
>> since they are saved under two directories processor0,1, does it mean
>> paraFoam cannot be used in this case? Thank you.
>>
>> Time = 0.01275
>>
>> Courant Number mean: 0.142852 max: 3.7703
>> smoothSolver:  Solving for Ux, Initial residual = 0.560774, Final
>> residual = 7.25301e-06, No Iterations 13
>> smoothSolver:  Solving for Uy, Initial residual = 0.210176, Final
>> residual = 8.97415e-06, No Iterations 10
>> smoothSolver:  Solving for Uz, Initial residual = 0.580007, Final
>> residual = 8.33788e-06, No Iterations 13
>> DICPCG:  Solving for p, Initial residual = 0.87801, Final residual =
>> 0.0268803, No Iterations 11
>> DICPCG:  Solving for p, Initial residual = 0.0229963, Final residual =
>> 0.00113944, No Iterations 9
>> DICPCG:  Solving for p, Initial residual = 0.00111865, Final residual =
>> 4.86087e-05, No Iterations 11
>> time step continuity errors : sum local = 2.63805e-06, global =
>> -2.6854e-07, cumulative = 2.84037e-06
>> DICPCG:  Solving for p, Initial residual = 0.216622, Final residual =
>> 0.00789831, No Iterations 10
>> DICPCG:  Solving for p, Initial residual = 0.00936633, Final residual =
>> 0.000371535, No Iterations 11
>> DICPCG:  Solving for p, Initial residual = 0.000378234, Final residual =
>> 9.57322e-07, No Iterations 17
>> time step continuity errors : sum local = 3.7861e-08, global =
>> 3.12631e-09, cumulative = 2.8435e-06
>> ExecutionTime = 99.51 s  ClockTime = 100 s
>>
>> --
>> You received this question notification because your team yade-users is
>> an answer contact for Yade.
>>
>> ___
>> Mailing list: https://launchpad.net/~yade-users
>> Post to : yade-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~yade-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-09-13 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Open => Answered

Deepak proposed the following answer:
Hi,
I need to have a look at the case, boundary conditions and things to
identify why this happens (my best bet is bad physics/numerical settings),
paraFoam can be used to view parallel cases, did you have a look into the
openfoam documentation/coupling documentation? The methods to post process
parallel
cases are there ..

https://cfd.direct/openfoam/user-guide/v6-paraview/
https://yade-dem.org/doc/FoamCoupling.html#post-processing

On Fri, Sep 13, 2019 at 11:09 AM Anqi H <
question683...@answers.launchpad.net> wrote:

> Question #683336 on Yade changed:
> https://answers.launchpad.net/yade/+question/683336
>
> Status: Answered => Open
>
> Anqi H is still having a problem:
> Hi Deepak,
>
> I'm running the same simulation with icoFoam for 0.05s, the particles
> are defined in fluidCouplingIDList and dynamic is disabled. The fluid
> case without the particles converges in openFoam, but after the
> particles are included, the simulation hangs after 0.01275s. I've been
> having trouble understanding why the program hangs here as the courant
> number is smaller than 0.5. The terminal output is copied to this post.
> Another question is about inspecting p,U properties of the fluid cells,
> since they are saved under two directories processor0,1, does it mean
> paraFoam cannot be used in this case? Thank you.
>
> Time = 0.01275
>
> Courant Number mean: 0.142852 max: 3.7703
> smoothSolver:  Solving for Ux, Initial residual = 0.560774, Final residual
> = 7.25301e-06, No Iterations 13
> smoothSolver:  Solving for Uy, Initial residual = 0.210176, Final residual
> = 8.97415e-06, No Iterations 10
> smoothSolver:  Solving for Uz, Initial residual = 0.580007, Final residual
> = 8.33788e-06, No Iterations 13
> DICPCG:  Solving for p, Initial residual = 0.87801, Final residual =
> 0.0268803, No Iterations 11
> DICPCG:  Solving for p, Initial residual = 0.0229963, Final residual =
> 0.00113944, No Iterations 9
> DICPCG:  Solving for p, Initial residual = 0.00111865, Final residual =
> 4.86087e-05, No Iterations 11
> time step continuity errors : sum local = 2.63805e-06, global =
> -2.6854e-07, cumulative = 2.84037e-06
> DICPCG:  Solving for p, Initial residual = 0.216622, Final residual =
> 0.00789831, No Iterations 10
> DICPCG:  Solving for p, Initial residual = 0.00936633, Final residual =
> 0.000371535, No Iterations 11
> DICPCG:  Solving for p, Initial residual = 0.000378234, Final residual =
> 9.57322e-07, No Iterations 17
> time step continuity errors : sum local = 3.7861e-08, global =
> 3.12631e-09, cumulative = 2.8435e-06
> ExecutionTime = 99.51 s  ClockTime = 100 s
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683775]: modelling "solid bridges" between particles

2019-09-10 Thread Deepak
Question #683775 on Yade changed:
https://answers.launchpad.net/yade/+question/683775

Status: Open => Answered

Deepak proposed the following answer:
Hi, 
 >   Each cylindrical beam will have the following parameters, length, cross 
 > section, young modulus, shear modulus
 and tensile strength

gridNode/gridConnections does exactly this, there are a few examples in
[1]  and for the physics of this model  see [2]

[1] https://gitlab.com/yade-dev/trunk/tree/master/examples/grids
[2] https://doi.org/10.1016/j.ecoleng.2013.05.002

But I am not sure if grids are intended to undergo 'breakage'

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-09-10 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Open => Answered

Deepak proposed the following answer:
Hi,

>I've decided to stick with icoFoam as my fluid flow is laminar and they
are both transient solvers

There is more to than just the problem being laminar and transient, the
choice of the solver also depends on the volume fraction of the solid
particle and the Reynolds number at the particle scale  ...

you need to set the ids to fluidCoupling even if the particles are
static, so in your script after the sphereIDs you need to add :

fluidCoupling.setIdList(sphereIDs)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-09-04 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Deepak proposed the following answer:
and also in the PyRunner for deletePar, set the iterPeriod=1.

On Wed, Sep 4, 2019 at 11:19 AM Deepak Kn 
wrote:

> Hello,
>
> There could be several reasons for this :
>
> Have you checked for the stability of the system ? Do particles 'fly' out
> of the domain within a few timesteps ? Have you made sure the courant
> number/time step in the fluid side is an acceptable value (<0.5) ?
> If all these are okay, then I suspect it is with the deletePar function as
> it may not be in sync with coupling.  One way to ensure this is to add an
> if condition to  check whether coupling occurs in the present time step..
>
> def deletePar(self) :
>  if (O.iter%fluidCoupling.dataExchangeInterval==0) :
>...
> try it and let me know..
>
>
>
>
>
>
>
>
> On Tue, Sep 3, 2019 at 10:33 AM Anqi H <
> question683...@answers.launchpad.net> wrote:
>
>> Question #683336 on Yade changed:
>> https://answers.launchpad.net/yade/+question/683336
>>
>> Status: Answered => Open
>>
>> Anqi H is still having a problem:
>> Hi Deepak,
>>
>> Thank you so much for your help so far. I've modified my script based on
>> your comment to check if a body does not have any cohesive bonds in its
>> interactions, if true then delete this sphere from fluidcoupling IDs. In
>> the first openFoam time step, some spheres were deleted as expected,
>> however, after the deletions and in the same foam timestep, it seems the
>> program hangs after 500 yade iterations and in the fluidCoupling step (I
>> have put the particle deletion pyrunner before calling fluidCoupling). I
>> have copied my python script below. I am sorry it's probably difficult
>> to run this script as it requires two other txt files that stored the
>> sphere locations. I was wondering if it was due to some obvious errors
>> in my script that I haven't noticed?
>>
>>
>> from __future__ import print_function
>> import sys
>> from yadeimport import *
>> from yade.utils import *
>> from yade import ymport
>>
>> initMPI()   #Initialize the mpi environment,
>> always required.
>> fluidCoupling = yade.FoamCoupling(); #Initialize the engine
>> fluidCoupling.getRank();#part of Initialization.
>>
>>
>> #example of spheres in shear flow : two-way point force coupling
>> class simulation():
>>
>>   def __init__(self):
>>
>> O.periodic = True;
>>
>> #proppant properties
>> FrictAng_p = 0.9
>> Density_p = 2650
>> Young_p = 100e6
>> TensileStr_p=3000
>> Cohesion_p=3000
>>
>> Young = 57e8 #apparent modulus
>> FrictAng = 0.5
>> Density = 2650
>> Poisson = 0.28
>> Cohesion = 38e6 # pa
>> TensileStr = 38e6 # pa
>>
>> rock =
>> JCFpmMat(type=1,young=Young,frictionAngle=FrictAng,density=Density,poisson=Poisson,tensileStrength=TensileStr,cohesion=Cohesion,label='rock')
>> proppant =
>> JCFpmMat(type=2,young=Young_p,frictionAngle=FrictAng_p,density=Density_p,tensileStrength=TensileStr_p,cohesion=Cohesion_p,label='proppant')
>>
>> O.materials.append(JCFpmMat(young=Young_p,frictionAngle=0,density=0,label='wallmat'))
>>
>> O.materials.append(proppant)
>> O.materials.append(rock)
>>
>> rock_assembly =
>>
>> O.bodies.append(ymport.textExt('new_rock.txt','x_y_z_r',shift=Vector3(0,0,0),scale=1,material=rock))
>>
>> for b in O.bodies:
>>   if b.state.pos[1]>0.017 or b.state.pos[1]<0.0135:
>> O.bodies.erase(b.id)
>>   #if (b.state.pos[1]>0.0135 and b.state.pos[1]<0.015) :
>># b.groupMask=2
>>   else:
>> b.dynamic = False
>> b.state.vel=(0, 0, 0)
>>
>> proppant_assembly =
>> O.bodies.append(ymport.textExt('new_prop.txt','x_y_z_r',shift=Vector3(0,0,0),scale=1,material=proppant,color=(1.00,0.67,0.50)))
>> print ('length of bodies proppant '+str(len(O.bodies)))
>>
>> for b in proppant_assembly:
>>   O.bodies[b].groupMask=2
>>   if O.bodies[b].state.pos[0] < 0:
>> print("found it ")
>> O.bodies.erase(b)
>>
>>
>> sphereIDs = [b.id for b in O.bodies if (type(b.shape)==Sphere and
>> b.material.label=='proppant')]
>>
>> #coupling engine settings
>> fluidCoupling.setNumParticles(len(s

Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-09-04 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Open => Answered

Deepak proposed the following answer:
Hello,

There could be several reasons for this :

Have you checked for the stability of the system ? Do particles 'fly' out
of the domain within a few timesteps ? Have you made sure the courant
number/time step in the fluid side is an acceptable value (<0.5) ?
If all these are okay, then I suspect it is with the deletePar function as
it may not be in sync with coupling.  One way to ensure this is to add an
if condition to  check whether coupling occurs in the present time step..

def deletePar(self) :
 if (O.iter%fluidCoupling.dataExchangeInterval==0) :
   ...
try it and let me know..





On Tue, Sep 3, 2019 at 10:33 AM Anqi H 
wrote:

> Question #683336 on Yade changed:
> https://answers.launchpad.net/yade/+question/683336
>
> Status: Answered => Open
>
> Anqi H is still having a problem:
> Hi Deepak,
>
> Thank you so much for your help so far. I've modified my script based on
> your comment to check if a body does not have any cohesive bonds in its
> interactions, if true then delete this sphere from fluidcoupling IDs. In
> the first openFoam time step, some spheres were deleted as expected,
> however, after the deletions and in the same foam timestep, it seems the
> program hangs after 500 yade iterations and in the fluidCoupling step (I
> have put the particle deletion pyrunner before calling fluidCoupling). I
> have copied my python script below. I am sorry it's probably difficult
> to run this script as it requires two other txt files that stored the
> sphere locations. I was wondering if it was due to some obvious errors
> in my script that I haven't noticed?
>
>
> from __future__ import print_function
> import sys
> from yadeimport import *
> from yade.utils import *
> from yade import ymport
>
> initMPI()   #Initialize the mpi environment,
> always required.
> fluidCoupling = yade.FoamCoupling(); #Initialize the engine
> fluidCoupling.getRank();#part of Initialization.
>
>
> #example of spheres in shear flow : two-way point force coupling
> class simulation():
>
>   def __init__(self):
>
> O.periodic = True;
>
> #proppant properties
> FrictAng_p = 0.9
> Density_p = 2650
> Young_p = 100e6
> TensileStr_p=3000
> Cohesion_p=3000
>
> Young = 57e8 #apparent modulus
> FrictAng = 0.5
> Density = 2650
> Poisson = 0.28
> Cohesion = 38e6 # pa
> TensileStr = 38e6 # pa
>
> rock =
> JCFpmMat(type=1,young=Young,frictionAngle=FrictAng,density=Density,poisson=Poisson,tensileStrength=TensileStr,cohesion=Cohesion,label='rock')
> proppant =
> JCFpmMat(type=2,young=Young_p,frictionAngle=FrictAng_p,density=Density_p,tensileStrength=TensileStr_p,cohesion=Cohesion_p,label='proppant')
>
> O.materials.append(JCFpmMat(young=Young_p,frictionAngle=0,density=0,label='wallmat'))
>
> O.materials.append(proppant)
> O.materials.append(rock)
>
> rock_assembly =
>
> O.bodies.append(ymport.textExt('new_rock.txt','x_y_z_r',shift=Vector3(0,0,0),scale=1,material=rock))
>
> for b in O.bodies:
>   if b.state.pos[1]>0.017 or b.state.pos[1]<0.0135:
> O.bodies.erase(b.id)
>   #if (b.state.pos[1]>0.0135 and b.state.pos[1]<0.015) :
># b.groupMask=2
>   else:
> b.dynamic = False
> b.state.vel=(0, 0, 0)
>
> proppant_assembly =
> O.bodies.append(ymport.textExt('new_prop.txt','x_y_z_r',shift=Vector3(0,0,0),scale=1,material=proppant,color=(1.00,0.67,0.50)))
> print ('length of bodies proppant '+str(len(O.bodies)))
>
> for b in proppant_assembly:
>   O.bodies[b].groupMask=2
>   if O.bodies[b].state.pos[0] < 0:
> print("found it ")
> O.bodies.erase(b)
>
>
> sphereIDs = [b.id for b in O.bodies if (type(b.shape)==Sphere and
> b.material.label=='proppant')]
>
> #coupling engine settings
> fluidCoupling.setNumParticles(len(sphereIDs))
> fluidCoupling.setIdList(sphereIDs)
> fluidCoupling.isGaussianInterp=False;  #use pimpleFoamYade for
> gaussianInterp
>
> # Integrator
> newton=NewtonIntegrator(damping=0.0, gravity = (0.0 ,0.0, 0.0))
>  # add small damping in case of stability issues.. ~ 0.1 max, also
> note : If gravity is needed, set it in constant/g dir.
>
>
> O.engines=[
>   ForceResetter(),
>   InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.2,
> label="bols"),Bo1_Facet_Aabb()], allowBiggerThanPeriod=True),
>   InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom(interaction

Re: [Yade-users] [Question #683553]: OpenFoam-Yade coupling fluid cell p, U at each time step

2019-09-01 Thread Deepak
Question #683553 on Yade changed:
https://answers.launchpad.net/yade/+question/683553

Status: Open => Answered

Deepak proposed the following answer:
In parallel runs, the domain is partitioned among the processors (based
on a spatial domain decomposition algorithm, can be set in the
system/decomposeParDict ). Hence the files in processor* corresponds to
the solution of 'piece' of the domain. Please see[1]

[1]https://cfd.direct/openfoam/user-guide/v6-running-applications-
parallel/

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683553]: OpenFoam-Yade coupling fluid cell p, U at each time step

2019-09-01 Thread Deepak
Question #683553 on Yade changed:
https://answers.launchpad.net/yade/+question/683553

Status: Open => Answered

Deepak proposed the following answer:
I see, did you run the Foam case without particles in serial? Note in
the coupling, openfoam is parallel, the  solution dirs such as '0,0.005'
etc in the case of  parallel  run are in directories 'processor0',
'processor1' etc.  the solution files are in these, to read this data .
see[1]

[1] https://yade-dem.org/doc/FoamCoupling.html#post-processing

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683553]: OpenFoam-Yade coupling fluid cell p, U at each time step

2019-08-31 Thread Deepak
Question #683553 on Yade changed:
https://answers.launchpad.net/yade/+question/683553

Deepak proposed the following answer:
For questions on openfoam, this is this best place : 
https://www.cfd-online.com/Forums/openfoam/

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683553]: OpenFoam-Yade coupling fluid cell p, U at each time step

2019-08-31 Thread Deepak
Question #683553 on Yade changed:
https://answers.launchpad.net/yade/+question/683553

Status: Open => Answered

Deepak proposed the following answer:
Hi,

This question is exclusive to openfoam, please restrict your questions
to the coupling and the solver. The write interval settings can be found
in the system/controlDict -> writeInterval and writeControl and so on..

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-28 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Open => Answered

Deepak proposed the following answer:
Hello,

Modifications in the source code have been made to insert/delete bodies. You 
can clone this branch[1] and verify it. 
I would suggest to make the following changes in your Yade script : 

In function  deletePar(self):

  def deletePar(self):
print("**YADE-ITER = " + str(O.iter) +" **")
ids = fluidCoupling.getIdList() # get the ids of bodies in existing coupling
for b in ids:
  if O.bodies[b].state.pos[0]>0.02:
print('delete id '+str(b))
O.bodies.erase(b)
fluidCoupling.eraseId(b);  # erase a specific id from the coupling

This function is called in O.engines as :

O.engines=[O.engines=[
  ForceResetter(),
  InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.2, 
label="bols"),Bo1_Facet_Aabb()], allowBiggerThanPeriod=True),
  InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.2, 
label="ig2s"),Ig2_Facet_Sphere_ScGeom()],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],

[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,label='lawFunctor')]
  ),
  GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.7, label = "ts"),
  PyRunner(command='sim.deletePar()',iterPeriod=10, label='checkPar'),
fluidCoupling, #to be called after timestepper
PyRunner(command='sim.printMessage()', iterPeriod= 1000, 
label='outputMessage'),
  newton,


VTKRecorder(fileName='yadep/3d-vtk-',recorders=['spheres','colors'],iterPeriod=1000)
]

To use these options (at present/immediately) you will have to clone the
Yade repository and  switch to branch : FoamCouplingOptions[1] and
compile  also pull the latest updates from Yade-OpenFOAM-coupling
repository[2],  (git pull origin, followed by Allwmake)

[1]  https://gitlab.com/yade-dev/trunk/tree/FoamCouplingOptions 
[2] https://github.com/dpkn31/Yade-OpenFOAM-coupling

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Deepak proposed the following answer:
Also, could you share a simple script (and the name of the openfoam
solver), so I can test this?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #683336]: Yade-OpenFoam-coupling delete the particles outside the fluid cells

2019-08-26 Thread Deepak
Question #683336 on Yade changed:
https://answers.launchpad.net/yade/+question/683336

Status: Open => Answered

Deepak proposed the following answer:
Hello,

Yes it is possible, although what kind of boundary conditions are used in the 
fluid problem? 
One way to do this would be to add a PyRunner function. 

In the function :

* check for particles that has lost the cohesion, exclude these ids. 
* reset the fluidCoupling.setNumParticles, with the number of cohesive bonds, 
*  put the ids of the particles you want in fluidCoupling.setIdList 

The PyRunner should be set before the fluidCoupling engine, let me know
if this works.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #681119]: code of penetrationVolume in yade

2019-05-29 Thread Deepak
Question #681119 on Yade changed:
https://answers.launchpad.net/yade/+question/681119

Deepak posted a new comment:
Hi,

a quick tip: you can use the  grep command to look for files, variable names 
etc. in your present directory. 
So you can look for penetrationVolume in trunk/pkg or trunk  like this : In 
terminal type :  grep -r 'penetrationVolume'  which gives me these results: 

(pyvirtual)dkunhappan@dt-com012:~/yadeTrunk/trunk/pkg$ grep -r
'penetrationVolume'

dem/Polyhedra_Ig2.cpp:  
bang->penetrationVolume=min(A->GetVolume(),B->GetVolume());
dem/Polyhedra_Ig2.cpp:  bang->penetrationVolume=volume;
dem/Polyhedra_Ig2.cpp:  bang->penetrationVolume=volume;
dem/Polyhedra_Ig2.cpp:  bang->penetrationVolume=volume;
dem/Polyhedra.hpp:  ((Real,penetrationVolume,NaN,,"Volume 
of overlap [m³]"))
dem/Tetra.hpp:  ((Real,penetrationVolume,NaN,,"Volume of overlap [m³]"))
dem/Tetra.hpp:  ((Real,penetrationVolume,NaN,,"Volume of overlap [m³]"))
dem/Tetra.hpp:  bool checkVertexToTriangleCase(const Triangle tA[4], 
const Point pB[4], const Segment sB[6], Vector3r& normal, Vector3r& 
contactPoint, Real& penetrationVolume);
dem/Tetra.hpp:  bool checkEdgeToEdgeCase(const Segment sA[6], const 
Segment sB[6], const Triangle tA[4], const Triangle tB[4], Vector3r& normal, 
Vector3r& contactPoint, Real& penetrationVolume);
dem/Tetra.hpp:  bool checkEdgeToTriangleCase1(const Triangle tA[4], 
const Segment sB[6], const Point pB[4], Vector3r& normal, Vector3r& 
contactPoint, Real& penetrationVolume);
dem/Tetra.hpp:  bool checkEdgeToTriangleCase2(const Triangle tA[4], 
const Triangle tB[4], const Segment sA[6], const Segment sB[6], Vector3r& 
normal, Vector3r& contactPoint, Real& penetrationVolume);
dem/Tetra.hpp:  bool checkVertexToEdgeCase(const Point pA[4], const 
Segment sA[6], const Triangle tA[4], const Segment sB[6], const Triangle tB[4], 
Vector3r& normal, Vector3r& contactPoint, Real& penetrationVolume);
dem/Tetra.hpp:  bool checkVertexToVertexCase(const Point pA[4], const 
Point pB[4], const Segment sA[6], const Triangle tA[4], const Triangle tB[4], 
Vector3r& normal, Vector3r& contactPoint, Real& penetrationVolume);
dem/Polyhedra.cpp:  if(!(contactGeom->equivalentPenetrationDepth > 
1E-18) || !(contactGeom->penetrationVolume > 0)) {
dem/Polyhedra.cpp:  Real prop = 
std::pow(contactGeom->penetrationVolume,volumePower);
dem/Polyhedra.cpp:  
fprintf(fin,"volume\t%e\n",contactGeom->penetrationVolume);
dem/Tetra.cpp:  
Real& penetrationVolume)
dem/Tetra.cpp:  penetrationVolume = TetrahedronVolume(v);
dem/Tetra.cpp:  if (penetrationVolume > .5*vol) { 
penetrationVolume = vol-penetrationVolume; }
dem/Tetra.cpp:  
Real& penetrationVolume)
dem/Tetra.cpp:  penetrationVolume = TetrahedronVolume(p);
dem/Tetra.cpp:  
Real& penetrationVolume)
dem/Tetra.cpp:  penetrationVolume = v1 + v2 + v3;
dem/Tetra.cpp:  contactPoint = (v1*cg1 + v2*cg2 + 
v3*cg3) / penetrationVolume;
dem/Tetra.cpp:  
Real& penetrationVolume)
dem/Tetra.cpp:  penetrationVolume = v1 + v2 + v3;
dem/Tetra.cpp:  contactPoint = (v1*cg1 + v2*cg2 + 
v3*cg3) / penetrationVolume;
dem/Tetra.cpp:  
Real& penetrationVolume)
dem/Tetra.cpp:  penetrationVolume = v1 + v2 + v3;
dem/Tetra.cpp:  contactPoint = (v1*cg1 + v2*cg2 + v3*cg3) / 
penetrationVolume;
dem/Tetra.cpp:  
Real& penetrationVolume)
dem/Tetra.cpp:  penetrationVolume = v1 + v2;
dem/Tetra.cpp:  contactPoint = (v1*cg1 + v2*cg2) / 
penetrationVolume;
dem/Tetra.cpp:  geom->penetrationVolume = V; \
dem/Tetra.cpp:  geom->penetrationVolume = (Real)-1.;
dem/Tetra.cpp:  bang->penetrationVolume=V;
dem/Tetra.cpp:  if ( geom->flag == 0 || geom->penetrationVolume <= 0. ) {
dem/Tetra.cpp:  Real& un=geom->penetrationVolume;

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #680876]: an error when i run my script

2019-05-16 Thread Deepak
Question #680876 on Yade changed:
https://answers.launchpad.net/yade/+question/680876

Deepak posted a new comment:
Hi, 
Based on a quick glance at your script, I find an inconsistency (and perhaps 
this could be the reason ? ) : 

 * All the bodies (polyhedra, sphere, facet, walls ) are using the
PolyhedraMat, perhaps PolyHedraMat is just for polyhedra and the others
require frictmat?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #680609]: mpi4py MPI terminates Yade

2019-05-03 Thread Deepak
Question #680609 on Yade changed:
https://answers.launchpad.net/yade/+question/680609

Deepak proposed the following answer:
 I don't think it would work because, Yade has to be compiled with MPI
libraries. This can be done with the latest git version[1], with the
ENABLE_MPI option as shown here in [2]

[1]https://gitlab.com/yade-dev/trunk
[2]https://yade-dev.gitlab.io/trunk/FoamCoupling.html

On Fri, May 3, 2019 at 6:18 PM Deepak Kn 
wrote:

> Hello,
>
> What happens when you try this :
> from mpi4py import MPI
> ?
>
> On Fri, May 3, 2019 at 5:03 PM Jiadun Liu <
> question680...@answers.launchpad.net> wrote:
>
>> Question #680609 on Yade changed:
>> https://answers.launchpad.net/yade/+question/680609
>>
>> Description changed to:
>> Hi All,
>> I met the following probem.
>>
>> jiadun@jiadun-HP-ZBook-15:~$ yade
>> Welcome to Yade 2019.01a
>> TCP python prompt on localhost:9000, auth cookie `ksyasu'
>> XMLRPC info provider on http://localhost:21000
>> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use
>> h-key for showing help), F10 both, F9 generator, F8 plot. ]]
>>
>> Yade [1]: from mpi4py import MPI
>> --
>> It looks like opal_init failed for some reason; your parallel process is
>> likely to abort.  There are many reasons that a parallel process can
>> fail during opal_init; some of which are due to configuration or
>> environment problems.  This failure appears to be an internal failure;
>> here's some additional information (which may only be relevant to an
>> Open MPI developer):
>>
>>   opal_error_register failed
>>   --> Returned value -2 instead of OPAL_SUCCESS
>> --
>> --
>> It looks like MPI_INIT failed for some reason; your parallel process is
>> likely to abort.  There are many reasons that a parallel process can
>> fail during MPI_INIT; some of which are due to configuration or
>> environment
>> problems.  This failure appears to be an internal failure; here's some
>> additional information (which may only be relevant to an Open MPI
>> developer):
>>
>>   ompi_mpi_init: opal_init_util failed
>>   --> Returned "(null)" (-2) instead of "Success" (0)
>> --
>> *** An error occurred in MPI_Init_thread
>> *** on a NULL communicator
>> *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
>> ***and potentially your MPI job)
>> [jiadun-HP-ZBook-15:3988] Local abort before MPI_INIT completed
>> successfully; not able to aggregate error messages, and not able to
>> guarantee that all other processes were killed!
>> jiadun@jiadun-HP-ZBook-15:~$
>>
>> Best regards,
>> Jiadun
>>
>> --
>> You received this question notification because your team yade-users is
>> an answer contact for Yade.
>>
>> ___
>> Mailing list: https://launchpad.net/~yade-users
>> Post to : yade-users@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~yade-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #680609]: mpi4py MPI terminates Yade

2019-05-03 Thread Deepak
Question #680609 on Yade changed:
https://answers.launchpad.net/yade/+question/680609

Status: Open => Answered

Deepak proposed the following answer:
Hello,

What happens when you try this :
from mpi4py import MPI
?

On Fri, May 3, 2019 at 5:03 PM Jiadun Liu <
question680...@answers.launchpad.net> wrote:

> Question #680609 on Yade changed:
> https://answers.launchpad.net/yade/+question/680609
>
> Description changed to:
> Hi All,
> I met the following probem.
>
> jiadun@jiadun-HP-ZBook-15:~$ yade
> Welcome to Yade 2019.01a
> TCP python prompt on localhost:9000, auth cookie `ksyasu'
> XMLRPC info provider on http://localhost:21000
> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key
> for showing help), F10 both, F9 generator, F8 plot. ]]
>
> Yade [1]: from mpi4py import MPI
> --
> It looks like opal_init failed for some reason; your parallel process is
> likely to abort.  There are many reasons that a parallel process can
> fail during opal_init; some of which are due to configuration or
> environment problems.  This failure appears to be an internal failure;
> here's some additional information (which may only be relevant to an
> Open MPI developer):
>
>   opal_error_register failed
>   --> Returned value -2 instead of OPAL_SUCCESS
> --
> --
> It looks like MPI_INIT failed for some reason; your parallel process is
> likely to abort.  There are many reasons that a parallel process can
> fail during MPI_INIT; some of which are due to configuration or environment
> problems.  This failure appears to be an internal failure; here's some
> additional information (which may only be relevant to an Open MPI
> developer):
>
>   ompi_mpi_init: opal_init_util failed
>   --> Returned "(null)" (-2) instead of "Success" (0)
> --
> *** An error occurred in MPI_Init_thread
> *** on a NULL communicator
> *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
> ***and potentially your MPI job)
> [jiadun-HP-ZBook-15:3988] Local abort before MPI_INIT completed
> successfully; not able to aggregate error messages, and not able to
> guarantee that all other processes were killed!
> jiadun@jiadun-HP-ZBook-15:~$
>
> Best regards,
> Jiadun
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #678139]: installing Yade on ubuntu 18.04

2019-01-30 Thread Deepak
Question #678139 on Yade changed:
https://answers.launchpad.net/yade/+question/678139

Status: Open => Answered

Deepak proposed the following answer:
Hi,

can you try compiling using -lpthread and see if it works?

1. Clean the build directory : erase everything.
2. In the build directory : 
cmake -lpthread -DCMAKE_INSTALL_PREFIX=/path/to/install /path/to/trunk

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #678139]: installing Yade on ubuntu 18.04

2019-01-30 Thread Deepak
Question #678139 on Yade changed:
https://answers.launchpad.net/yade/+question/678139

Deepak posted a new comment:
@Jérôme Duriez (jduriez)  
Hi, 
That's from CMakeOutput.log in build/CMakeFiles/CMakeOutput.log

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #678139]: installing Yade on ubuntu 18.04

2019-01-30 Thread Deepak
Question #678139 on Yade changed:
https://answers.launchpad.net/yade/+question/678139

Deepak proposed the following answer:
Also, can you post the contents of CMakeError.log
(build/CMakeFiles/CMakeError.log)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #678139]: installing Yade on ubuntu 18.04

2019-01-30 Thread Deepak
Question #678139 on Yade changed:
https://answers.launchpad.net/yade/+question/678139

Status: Needs information => Answered

Deepak proposed the following answer:
Hello, 
The error arises from the lib pthread (-lpthread(s)), my initial guess was that 
it was not installed. 
But looking at the output log of CMake, the pthread library already exists. One 
reason for this error could be due to a  missing  package or a version 
mismatch. 
As Robert has mentioned, did you follow the build instructions in the 
documentation (installing all the prerequisite libraries)  ?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #678139]: installing Yade on ubuntu 18.04

2019-01-29 Thread Deepak
Question #678139 on Yade changed:
https://answers.launchpad.net/yade/+question/678139

Status: Open => Needs information

Deepak requested more information:
Hi, 
Could you post the full output from cmake?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #670255]: Modelling a Homogenous slope with properties of rock

2018-06-30 Thread Deepak
Question #670255 on Yade changed:
https://answers.launchpad.net/yade/+question/670255

Deepak proposed the following answer:
Hello,

There is an utility called stl2gts, which can triangulate the surfaces
using gts. Several examples generating sphere packs are here[2]:
[1]http://manpages.ubuntu.com/manpages/xenial/man1/stl2gts.1.html
[2]https://github.com/yade/trunk/tree/master/examples/gts-horse

On Sat, Jun 30, 2018 at 11:42 AM, Chareyre <
question670...@answers.launchpad.net> wrote:

> Question #670255 on Yade changed:
> https://answers.launchpad.net/yade/+question/670255
>
> Status: Open => Answered
>
> Chareyre proposed the following answer:
> I think stl is the most used format with yade, but not expert of this part.
> You may check the doc of the import functions.
> Bruno
>
> Le sam. 30 juin 2018 07:38, Shivpreet sharma <
> question670...@answers.launchpad.net> a écrit :
>
> > Question #670255 on Yade changed:
> > https://answers.launchpad.net/yade/+question/670255
> >
> > Status: Answered => Open
> >
> > Shivpreet sharma is still having a problem:
> > Yes it is there *.stl format but can we used this in YADE???
> >
> > --
> > You received this question notification because your team yade-users is
> > an answer contact for Yade.
> >
> > ___
> > Mailing list: https://launchpad.net/~yade-users
> > Post to : yade-users@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~yade-users
> > More help   : https://help.launchpad.net/ListHelp
> >
> >
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #670258]: sphere fall down to node-net

2018-06-18 Thread Deepak
Question #670258 on Yade changed:
https://answers.launchpad.net/yade/+question/670258

Deepak posted a new comment:
Hi,

The main issue lies in the  materials : material for the gridConnection and the 
sphere is not defined. It looks like this triggers the 
' AMBIGUOUS: 1+3 -> Law2_ScGeom_FrictPhys_CundallStrack' error.

There are some other issues such as:

1.)  ,Bo1_Facet_Aabb() is not needed, 
2.) ,Ig2_Facet_Sphere_ScGeom(), is not required.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #665054]: Parallel run when i call a yade script from another file

2018-03-06 Thread Deepak
Question #665054 on Yade changed:
https://answers.launchpad.net/yade/+question/665054

Deepak posted a new comment:
Hello John,

One way to speed up your simulation would be to identify the bottlenecks in 
your script. This could come from the loops inside your python script.
 For example : looping through all the bodies in every time step and doing some 
calculations. Such loops inside the python script can lower the performance.  
If you have a  python function which does something similar every timestep, it 
would be better to write them in C++ and call the C++ function in your script.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #665049]: error when installing yade on centos

2018-03-01 Thread Deepak
Question #665049 on Yade changed:
https://answers.launchpad.net/yade/+question/665049

Deepak posted a new comment:
i think the boost include files  are in : /usr/include/boost and to find the 
library directory you could search for it using the locate command : 
eg.:
locate boost_python.so
would give you the path of the boost libs. You need to add the path for both 
the include as well as the lib directories.
For example my setup.py file looks like this: 
libraries=['boost_python']
 library_dirs=['/share/apps/boost_1_57_0-GCC48/lib']
 
include_dirs=['/kareline/data/deepak/yade/mylibs/eigen_lib/install/include/eigen3','/share/apps/boost_1_57_0-GCC48/include','minieigen']

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #665049]: error when installing yade on centos

2018-03-01 Thread Deepak
Question #665049 on Yade changed:
https://answers.launchpad.net/yade/+question/665049

Deepak posted a new comment:
Hi,

looking at this line :

 gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-
buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-
protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE
-fPIC -fwrapv -fPIC -DEIGEN_DONT_ALIGN -Isrc -I/usr/include/eigen3
-I/usr/local/include/eigen3 -Iminieigen -I/usr/include/python2.6 -c
src/minieigen.cpp -o build/temp.linux-x86_64-2.6/src/minieigen.o

I think that the boost libraries are not linked in your compilation, you
can manually set the path to the boost libraries in the setup.py file
(see lines 17 and 18 where you have to set the path for boost include
directory and the libraries directory).

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #665054]: Parallel run when i call a yade script from another file

2018-02-28 Thread Deepak
Question #665054 on Yade changed:
https://answers.launchpad.net/yade/+question/665054

Status: Open => Answered

Deepak proposed the following answer:
Hi John,

Before you execute your python script, you can set the number of threads
:

export OMP_NUM_THREADS=4

and then you could run your simulation like this:

python yourscipt.py -j4

Could you check if this works?


On Wed, Feb 28, 2018 at 10:42 AM, JOHN <question665...@answers.launchpad.net
> wrote:

> New question #665054 on Yade:
> https://answers.launchpad.net/yade/+question/665054
>
> Good evening,
> I am currently calling a yade python script from another python script.
> something like this
>
> import Yadesimulation
>
> from Yadesimulation import *
>
> where Yadesimulation is the yade script.
> My question is, how can i run I speed it up?  I tried running it on
> parallel, using [1]. However, although when i try similar examples with
> pure jade and yade -j4 it gives me a good speedup, the script approach
> produces no speedup at all. Am i missing something?
>
>
> For the record i put
>
> import sys
> import os
> sys.argv.extend(['-j','4'])
> os.system("ln -s /usr/bin/yade yadeimport.py")
> from yadeimport import yade
>
>
> in my yade script and i have 4 cores in my linux machine, so there should
> be a lot more than enough threads.
>
>
>
> [1]https://answers.launchpad.net/yade/+question/271679
>
>
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #664093]: Is there a way to install yade on centos 6.6

2018-02-05 Thread Deepak
Question #664093 on Yade changed:
https://answers.launchpad.net/yade/+question/664093

Status: Open => Answered

Deepak proposed the following answer:
Hello,

YADE can be compiled in CentOS, you will have to compile all the third
party libraries by yourself and provide the include and lib directories
in the CMakeLists.txt or in the trunk/cMake/FindPackage.cmake.

" any instrucions?" 
instructions on how to compile YADE from source is here :  
https://yade-dem.org/doc/installation.html 
see the  'Source code' and 'Compilation' section.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #661618]: Grids visualization in ParaView

2017-12-12 Thread Deepak
Question #661618 on Yade changed:
https://answers.launchpad.net/yade/+question/661618

Status: Open => Answered

Deepak proposed the following answer:
Hello,

I use the VTK recorder in the O.engines list like this: (I just have
gridNodes and gridConnections in my simulation)

VTKRecorder(fileName='fibvtk/frp-',recorders=['intr'],iterPeriod=1)

This would export all the interactions and you will see it as a lines in 
paraview when you open it.
In paraview, use the 'tube' filter, set the number of sides (6 is default, I 
use 12). and the radius of the grid node. You would be able to see the 3D 
representation for the gridconnections. But the situation would be different 
when you have spheres in your simulation,  you would see the interactions 
appear as cylinders between the gridconnection-sphere and sphere-sphere 
interactions. 
I think you can use the VTKexporter, exportInteractions() [1] with the ids of 
the gridnodes for viewing the gridconnections alone.

[1]https://yade-
dem.org/doc/yade.export.html?highlight=vtkexporter#yade.export.VTKExporter

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #661017]: call a class from yade

2017-11-22 Thread Deepak
Question #661017 on Yade changed:
https://answers.launchpad.net/yade/+question/661017

Status: Open => Answered

Deepak proposed the following answer:
Hi,

If I understand correctly, you intend to run yade under a ''pure python''
environment?  If that's the case you could have a look at these notes in
[1].  You might also want to look at how to instantiate an instance of your
class (having __init()__ method)[2].

An example of python script importing yade as a module is here [3] (this
script is based on one of the example scripts) [4]

[1]
https://yade-dem.org/doc/user.html#importing-yade-in-other-python-applications
[2]https://docs.python.org/2/tutorial/classes.html
[3]https://pastebin.com/J5FsRWQe
[4]
https://github.com/yade/trunk/blob/e4e757f2e98a620e3177b7a36a1d10f69f6a6a28/examples/concrete/triax.py


On Wed, Nov 22, 2017 at 6:08 PM, JOHN <question661...@answers.launchpad.net>
wrote:

> New question #661017 on Yade:
> https://answers.launchpad.net/yade/+question/661017
>
> Good evening,
> What i am trying to do is bundle the yade simulation in  a class which
> works
>
> from yade.pack import *
> from yade import ymport
> import math
> class simul():
> def run(self):
> O.bodies.append([
> sphere((0,0,4),1),
> sphere(center=(0,0,0),radius=.5,fixed=True)
> ])
>
> O.engines=[
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb()]),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_ScGeom_FrictPhys_CundallStrack()]
> ),
> NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1),
> ]
> O.dt=.5e-4*PWaveTimeStep()
>
>
>
> #simulation=simul()
> #simulation.run()
>
>
>
>
> and call it from another file
>
>
>
>
>
> import math
> import operator
> import gts
> from yade.pack import *
> from yade import ymport
>
>
> from myclass import simul
> simulation=simul()
> simulation.run()
>
>
>
> i get this
>
> yade run.py
>
> Welcome to Yade 1.20.0
> TCP python prompt on localhost:9000, auth cookie `ucsdsy'
> XMLRPC info provider on http://localhost:21000
> Running script run.py
> Traceback (most recent call last):
>   File "/usr/bin/yade", line 182, in runScript
> execfile(script,globals())
>   File "run.py", line 10, in 
> from myclass import simul
> ImportError: No module named myclass
> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key
> for showing help), F10 both, F9 generator, F8 plot. ]]
> [0;34mYade [[1;34m1[0;34m]: [0m
>
>
> Thank you for the help
> (PS, amazing community)
>
>
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #654032]: Linking a fortran module with Yade (CMakeLists.txt)

2017-07-28 Thread Deepak
Question #654032 on Yade changed:
https://answers.launchpad.net/yade/+question/654032

Status: Answered => Solved

Deepak confirmed that the question is solved:
Hello Bruno,

Thanks for your advice, I have compiled it modules as a shared lib and
linked it!

Thanks and Regards, 
Deepak

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #654032]: Linking a fortran module with Yade (CMakeLists.txt)

2017-07-28 Thread Deepak
Question #654032 on Yade changed:
https://answers.launchpad.net/yade/+question/654032

Deepak confirmed that the question is solved:
Thanks Bruno Chareyre, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #654032]: Linking a fortran module with Yade (CMakeLists.txt)

2017-07-28 Thread Deepak
Question #654032 on Yade changed:
https://answers.launchpad.net/yade/+question/654032

Deepak posted a new comment:
P.S : for a simple case involving 1 .cpp and 1 .f90 source, I had used a
CMakeLists.txt like this:

project(Appli C CXX Fortran)
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_CXX_COMPILER "mpicxx")
find_package(MPI)
add_executable(appli cfort.cpp fortmodule.f90)
target_link_libraries(appli)

and compiling manually by hand I do it this way :

mpicxx -c cfort.cpp 
mpif90 -c fortmodule.f90
mpicxx -o appli cfort.o fortmodule.o -lgfortran -lmpi_mpifh -lmpi_cxx 


thanks.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #654032]: Linking a fortran module with Yade (CMakeLists.txt)

2017-07-28 Thread Deepak
New question #654032 on Yade:
https://answers.launchpad.net/yade/+question/654032

Hello, 

I am trying to link a fortran module which is called by a C++ code inside Yade 
and I am not sure how to compile it properly with CMake (looks like CMake 
doesn't compile the fortran source)

I modified the trunk/CMakeLists.txt as :  

project(Yade C CXX Fortran)
set(CMAKE_Fortran_COMPILER "mpif90")  
set(CMAKE_CXX_COMPILER "mpicxx")
set(CMAKE_C_COMPILER "mpicc")

FIND_PACKAGE(MPI)

I put the fortran source in the trunk/py folder along with the C++ functions 
(implemented in _utils.hpp and_utils.cpp) and compilation proceeds without any 
errors.  However when I start yade I get an undefined symbol error which looks 
this :

 undefined symbol: __coupler_MOD_hello   (coupler fortran module name, and 
hello name of function in fortran)

This is because the fortran module has not been linked during compilation.  My 
question is how can I link fortran sources for compilation. 

Thanks and Regards, 
Deepak






-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #647852]: Using openmp in a python script.

2017-07-13 Thread Deepak
New question #647852 on Yade:
https://answers.launchpad.net/yade/+question/647852

Hello, 

I currently run Yade by importing it in a python script as explained in [1]. 
However I am unable to utilize more than 1 core(for yade) in my simulations, 
I've tried the method described in [2], and I don't see any difference and I've 
also tried setting 'ompThreads=(N)' in the engines and I see no effect. (There 
are around 50k particles in the simulation)

I run yade in parallel with another application under MPI as follows  : 
mpiexec -n 1 python yade : - n 12 app2 

Is there a way I could get openmp working in such a situation?

(I had disabled LINSOLV, LBMFLOW,BLAS during compilation as suggested in here 
[3])

[1] 
https://yade-dem.org/doc/user.html#importing-yade-in-other-python-applications 
[2]https://answers.launchpad.net/yade/+question/271679
[3]https://answers.launchpad.net/yade/+question/247865

Thanks, 
deepak

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #643703]: Installation on centOS7 (loki pb)

2017-06-13 Thread Deepak
Question #643703 on Yade changed:
https://answers.launchpad.net/yade/+question/643703

Deepak proposed the following answer:
hi,

if you have compiled loki, you could go to trunk/cMake/FindLoki.cmake

and add your include dir in the FIND_PATH command :

FIND_PATH(LOKI_INCLUDE_DIR /path/'to/your/loki/include/loki/)

and  edit the FIND_LIBRARY command:
FIND_LIBRARY(LOKI_LIBRARY NAMES /path/'to/your/loki//lib)



On Tue, Jun 13, 2017 at 8:18 PM, Anton Gladky <
question643...@answers.launchpad.net> wrote:

> Question #643703 on Yade changed:
> https://answers.launchpad.net/yade/+question/643703
>
> Status: Open => Answered
>
> Anton Gladky proposed the following answer:
> Please be careful. The link was just an example, that the RPM package
> exist. You should install it from your repo! Just find the package in
> your package manager. Sorry for confusion.
>
> Regards
>
> Anton
>
> 2017-06-13 20:08 GMT+02:00 Cédric <question643...@answers.launchpad.net>:
> > But your reply provided me a different vision on the topic: I think I
> simply can download the .rpm and install it without breaking any
> dependancies :)
> > Am I right ?
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #294529]: random orientation of chained cylinders

2016-05-30 Thread Deepak
Question #294529 on Yade changed:
https://answers.launchpad.net/yade/+question/294529

Deepak proposed the following answer:
Hi,

Here's a small code which generates random fibres in a box(similar to
Klaus Thoeni's  idea). You can control the number of fibres, and the the
number of fibre segments. The file fibgen.f90 is a fortran code which
generates the fibres, (it's commented and self explanatory, I guess).
The file yy.py is an example with respect to yade. (reading the
coordinates, appending to bodies etc.).

To compile : gfortran fibgen.f90, to run ./a.out .. => writes a file called 
nodes3.dat
To run in yade : yadedaily yy.py 

hope this helps!

links : 
https://www.dropbox.com/s/nza8v41rt8jovci/fibgen.f90?dl=0
https://www.dropbox.com/s/omg2ttivzwvh5os/fibres_in_box.png?dl=0
https://www.dropbox.com/s/0yrxzjhqw1elm03/yy.py?dl=0

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #294529]: random orientation of chained cylinders

2016-05-30 Thread Deepak
Question #294529 on Yade changed:
https://answers.launchpad.net/yade/+question/294529

Deepak proposed the following answer:
I forgot to add, the fibres are generated with respect to gridNode,
gridConnection in YADE

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #262286]: Invoking yade.qt.View()

2015-02-18 Thread Deepak
Question #262286 on Yade changed:
https://answers.launchpad.net/yade/+question/262286

Deepak confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #262286]: Invoking yade.qt.View()

2015-02-18 Thread Deepak
Question #262286 on Yade changed:
https://answers.launchpad.net/yade/+question/262286

Status: Answered = Solved

Deepak confirmed that the question is solved:
Hello Jan,

I run the python script and the fluid code under an MPI environment. I execute 
the script as : 
mpiexec -n 1 python yadescript.py : -n 4 fluid_code 
I use MPI functions to send and recieve data between the codes. 
I think I will go with the paraview workaround. 

Thank you very much!

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #262286]: Invoking yade.qt.View()

2015-02-17 Thread Deepak
New question #262286 on Yade:
https://answers.launchpad.net/yade/+question/262286

Hello, 

I am runnng yade and a fluid code simultaneously exchanging data and I would 
like to see what happens in the yade simulation. I had tried invoking the 
qt.view but an inactive box pops up showing nothing. I am running yade by 
importing it in to python as described in the user manual. Are there any 
work-arounds for this? 


Thanks and Regards, 
Deepak 

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #260135]: problem of pyrunner when import yade

2015-01-05 Thread Deepak
Question #260135 on Yade changed:
https://answers.launchpad.net/yade/+question/260135

Deepak proposed the following answer:
Hello Carrie,

I also had a similar issue with PyRunner while importing yade in python,
 
I had followed the method as described in this thread : 
(https://answers.launchpad.net/yade/+question/235866), 
guess you have to define the yade simulation part as a class and then in the 
function which you call PyRunner (in your case addForceStep() ), you could try 
this def addForceStep(self):

This had worked for me.

 
Regards, 
Deepak

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp