Properties of particles

edited December 2013 in Old versions
Does anyone have an Case example that uses different particle properties? I am referring to pages 39-42 of the GenCase_XML_GUIDE.pdf

If you have set up a Case that works, please share it here. I can't seem to get it to work.

Thanks.

Comments

  • Never mind!
    I figured it out.
  • email Jose (jmdalonso@gmail.com) asking for an example if you need it

    regards
  • I am also struggling with the same problem ( pages 39-42 of the GenCase_XML_GUIDE.pdf). I can not apply different particle properties!

    Could you please send me or share a case that works.

    @ alex I could not reach Jose
  • me neither.
  • We will try to help you ASAP
  • edited January 2014
    Dear Alex,

    I'm trying to assign a simple property to the specific boundary particles to change their mass and density (Actually changing their pressure in first stage of calculation). I added the property part to the case Xml file. After running Gencase.exe we can see in the output of the run (Xml file) that the property is assign to that mk. But after running the dualSPHysics and other visualization exes there is no changes to the particles properties(We have still rhop=1000 for that boundary particles).
    Maybe I didn't understand how assigning the properties, works in the new version. If it's possible for DualSPHysics team please give us more information about how to correctly assign a specific property to the particles and actually how or in which situations it works properly. In my opinion new Gencase manual (pages 39-42) doesn't have enough and clear description on properties part applications.

    Thanks for your all helps and your contributions in different discussions.

    Regards,
    Mojtaba
  • Hi all, I face exactly the same problem

    Thank you so much
  • Dear all,

    This option does not change the fluid behavior. This option allows you to assign variables to particles according to their mk. I send to you an example to assign new variables to floating bodies and to get these values in the code. But you have to change the code to use these values.

    Best regards,
    Jose


    void JSph::LoadCaseConfig(){
    ...
    //-Loads floating objects.
    FtCount=parts.CountBlocks(PT_Floating);
    if(FtCount){
    AllocMemoryFloating(FtCount);
    unsigned cobj=0;
    for(unsigned c=0;cbegin=fblock.GetBegin();
    fobj->count=fblock.GetCount();
    fobj->mass=fblock.GetMassbody();
    fobj->massp=fobj->mass/fobj->count;
    fobj->center=fblock.GetCenter();
    fobj->inertia=fblock.GetInertia();
    fobj->fvel=fblock.GetVelini();
    fobj->fomega=fblock.GetOmegaini();

    double young=fblock.GetSubValueDouble("Young_Modulus","value");
    float poisson=fblock.GetSubValueFloat("PoissonRatio","value");
    float kfric=fblock.GetSubValueFloat("Kfric","value");
    sprintf(Cad,"--->Young_Modulus: %f",young); Log->Print(Cad);
    sprintf(Cad,"--->PoissonRatio: %f",poisson); Log->Print(Cad);
    sprintf(Cad,"--->Kfric: %f",kfric); Log->Print(Cad);

    cobj++;
    }
    }
    }
    }
  • thank you very much!!!
  • Dear Alex, could you please send me a copy of the example too? Thanks!
  • I think Jose Dominguez has already sent to you that, has not he?

    Regards
  • edited January 2014
    Dear Alex,

    Thanks for the codes and the E.mail.
    If we want to add a specific property to a mkbound, what should we do then?Or could you please tell me if it's possible in v.3 or not?
    As I mentioned before I need to change the "fixed boundary particles" density by changing their weight(mass) to assign a different density (Not 1000 value) in the first stage of the calculations.
    Thanks a lot.

    Regards.
    Mojtaba
  • I've got the example case,thanks to you all!
  • Dear Mojtaba.

    You can define the property in the XML using the new v3.0 however you are only passing this info to the XML that will be loaded by DualSPHysics. Thus, to use this value you have to implement it and modify the source files of DSPH v3.0.

    The new option of defining new properties in the XML assigned to MK values
    is only the starting point to help users to implement new capabilities or functions.

    Regards

    Alex
  • Dear Alex,

    I tried to read the code and add an additional property (e.g. sediment concentration) for the fluid particles. Because c++ is relative new for me it is a little hard. I have read all your comment on the property. I still have some questions to ask. The 'casename.bi2' generated by the GENCASE also doesn't contain any information of the property, right? And the define in the XML file can only give a very start, and if I'd like to give each particle a value of property I have to modify the code?

    Thank you very much. And could you give me some other tips on this topic, e.g. where to link the properties?

    Regards,

    Yi
  • Dear Alex,

    Could you also give me a copy of the example? Thanks. my email: panyi21hhu@gmail.com
  • Hi all,

    I understood that the option helps to get values into Dualsphysics by the .xml, which is really great.

    However, if I want to use a value in any kind of physical law, for example the friction law presented in Monaghan et al. (2003), I am not entirely sure where/how to implement the law. At present I would have implemented the law in somewhere in JSphCpuSingle::RunFloating (at least for the CPU), where the movements of the floatings are calculated.

    It would be really great if anyone could give me a hint at which location the law has to be implemented and which further steps are required (e.g. further loops…)

    Furthermore, it would be very interesting to know, how to modify the properties of a second fluid and thereby being able to simulate a further phase e.g. something like oil?
    As far as I remember something like this was mentioned in the announcements for the recent version. Is there an example case?

    Thank you so much
  • Just in case someone is confused....

    The new capability of defining different properties in the XML file is just a help to be able to read these values on DualSPHysics since you source files are provided. Any new functionality you want using these properties must be implemented ON YOUR OWN. We only add the possibility of adding easily properties to set of particles, that is it.

    Regards

  • edited February 2014
    Dear Alex,

    Thanks for your explanations.

    Regards,
    Mojtaba

  • It would be really great if anyone could give me a hint at how can i add pressure as variable to be plotted along time in case pump.

    best regards
  • Using PartVTK you can get the output of pressure in VTK to be visualised with Paraview or in CSV or ASCII to represent it as you want.

    Read the Help of PartVTK, please.

    Alex
Sign In or Register to comment.