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 #652968]: Implementing Local Damping

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

Nima Goudarzi gave more information on the question:
Dear Bruno,
Thanks so much again and sorry for rising up this again. I am still a little 
confused with applying local damping:
a very quick question on your comment
(13) Newton::damping is the value of Cundall's/PFC "non-viscous" damping
> (the one with default 0.7 in PFC). Again, it has nothing to do with the
> contact model (it is thus irrelevant to distinguish linear vs. non-
> linear models). Newton::damping is set in the scripts.
                 //

   /* DAMPING COEFFICIENTS */                    FROM HM.cpp

   //


   // Inclusion of local damping if requested

   // viscous damping is defined for both linear and non-
linear elastic case

   if (useDamping && LinDamp){

  Real mbar = (!b1->isDynamic() &&
b2->isDynamic()) ? de2->mass : ((!b2->isDynamic()

     && b1->isDynamic()) ? de1->mass :
(de1->mass*de2->mass / (de1->mass + de2-

 >mass))); // get equivalent mass if
both bodies are dynamic, if not set it equal to the one of

 the dynamic body

  //Real mbar = de1->mass*de2->mass /
(de1->mass + de2->mass); // equivalent mass

  Real Cn_crit = 2.*sqrt(mbar*phys->kn); //
Critical damping coefficient (normal direction)

  Real Cs_crit = 2.*sqrt(mbar*phys->ks); //
Critical damping coefficient (shear direction)

  // Note: to compare with the analytical
solution you provide cn and cs directly (since here

    we used a different method to define
c_crit)

  cn = Cn_crit*phys->betan; // Damping
normal coefficient

  cs = Cs_crit*phys->betas; // Damping
tangential coefficient

  if(phys->kn<0 || phys->ks<0){
cerr<<"Negative stiffness kn="isDynamic() &&
b2->isDynamic()) ? de2->mass : ((!b2->isDynamic()

 && b1->isDynamic()) ? de1->mass :
(de1->mass*de2->mass / (de1->mass + de2-

      >mass))); // get equivalent mass if
both bodies are dynamic, if not set it equal to the one of

 the dynamic body

  cn = phys->alpha*sqrt(mbar)*pow(uN,0.25);
// normal viscous coefficient, see also

    [Antypov2011] eq. 10

  cs = cn; // same value for shear viscous
coefficient

   }


Do you mean I should keep unchanged everything included in the above
code and set the local damping in the script? or I need to set cn=cs=0
wherever I find them in the code? If possible, would you please apply
the required changes (if needed) in the above code if possible?

Sincerely yours,
Nima 

On Thursday, July 27, 2017 4:57 PM, Nima Goudarzi 
 wrote:
 

 Your question #652968 on Yade changed:
https://answers.launchpad.net/yade/+question/652968

    Status: Answered => Open

You are still having a problem:
Dear Bruno,

I highly appreciate your kind attention toward my request. Many of your
answers are extremely helpful. I am currently working on writing the
code but still have some issues in energy terms and displacements (I am
trying to adapt what have been implemented for shear to rolling and
twisting but have some difficulties). I will be back soon to ask some
extra questions regarding my new issues.


Sincerely yours,

Nima


> On Jul 26, 2017, at 7:53 AM, Bruno Chareyre 
>  wrote:
> 
> Your question #652968 on Yade changed:
> https://answers.launchpad.net/yade/+question/652968
> 
>    Status: Open => Answered
> 
> Bruno Chareyre proposed the following answer:
>> my main concern is the possibility of passing some model parameters to
> Iphys (I think there is no need to define a new class of material but
> please correct me if I am wrong)
> 
> It is possible and indeed simpler usually. [*] Adding the parameters to
> a material class gives more flexibility when mixing particles of
> different properties.
> 
> (1) radius1 is an alias of refR1, you can use both names equivalently
> (ScGeom.hpp:58)
> 
> (2) I see no need to change current code since it does what you need as
> a special case.
> 
> (3) ξ can be where you have it now or in the material class, see [*]
> 
> (4) same answer. In this case it is obvious that if you want to have
> particles of different 

Re: [Yade-users] [Question #654044]: Error while sphere packing in geometry

2017-07-28 Thread Jan Stránský
Question #654044 on Yade changed:
https://answers.launchpad.net/yade/+question/654044

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> No suitable packing in database found, running PERIODIC compression

it is no error, just info message

To get spheres to simulation, do
O.bodies.append(spheres)

cheers
Jan

-- 
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 Bruno Chareyre
Question #654032 on Yade changed:
https://answers.launchpad.net/yade/+question/654032

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hi Deepak, I'm not sure the cmake process is very flexible in this situation 
but it should be possible to simply pass the link via the gcc flags, something 
like
cmake -DCMAKE_CXX_FLAGS=-lYourLib
(or maybe another flag will do)
Cheers
Bruno

-- 
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 #650549]: triaxial test code

2017-07-28 Thread Jan Stránský
Question #650549 on Yade changed:
https://answers.launchpad.net/yade/+question/650549

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> I ... pasted some codes from the tutorial and tried to run

please, if your problem is related to the code,  send the code as a part of the 
message.
I **guess** you tried the tutorial from Yade web page, so I have tried that 
tutorial and got no error.

cheers
Jan

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


Re: [Yade-users] [Question #650549]: triaxial test code

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

sisay atumo gave more information on the question:
Hello, sorry for asking improperly 
I'm a railway civil engineering student and installed yade to use it for my 
Msc. thesis project. and I want to model railway ballast system to analyze 
stresses and other conditions. 

I'm beginner for yade and I need some tutorials. I tried to read the
yade document and pasted some codes from the tutorial and tried to run.
but it shows me errors. I need help please. I pasted the error code
bellow when running the example called 'Periodic triaxial test.py'
bellow:

ERROR /build/yade-iRsyM_/yade-2016.06a/pkg/common/InsertionSortCollider.cpp:240 
action: verletDist is set to 0 because no spheres were found. It will result in 
suboptimal performances, consider setting a positive verletDist in your script.
WARN  /build/yade-iRsyM_/yade-2016.06a/pkg/dem/Shop_01.cpp:456 PWaveTimeStep: 
PWaveTimeStep has not found any suitable spherical body to calculate dt. dt is 
set to 1.0

by the way I installed the yade software online by executing the command ' sudo 
apt get install yade'. I need some comments on this also. 
thank you!

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