Generate Gyroid structures using Matlab (Meshlab +FreeCAD conversion)

Поделиться
HTML-код
  • Опубликовано: 2 авг 2024
  • Gyroid generation based on Matlab script. The advantage is the capability to manipulate the thickness, position and mesh density. At the end I show how the mesh is exported, and improved in Meshlab and also converted to Solid in FreeCAD.
    To calculate approximate volume fraction use:
    Solid Netwrok Vf=0.5-0.333*t
    Sheet network Vf=0.65*t
    Source DOI :10.1177/0278364920907697
    The Matlab script is below:
    % Clear all previous commands
    clear all
    close all
    clc
    % Variables you can change
    SizeL = 20; %average length of RVE
    Def = 40; %definition
    % Variables you shouldn´t change
    SFact = (SizeL/2)/pi; %size factor of RVE
    A = SFact*pi; %lowest and max coordinates of meshgrid
    D = A/Def; %definition factor
    % Generation of gyroids
    [X,Y,Z] = meshgrid(-A:D:A); %creates mesh grid
    % Gyroid equation
    OBJ = cos(X/SFact).* sin(Y/SFact) + cos(Y/SFact).* sin(Z/SFact)...
    + cos(Z/SFact).* sin(X/SFact)+(0);
    T = 0.5;
    OBJ = (OBJ-T).*(OBJ+T);
    % Isosurface and isocap
    [F1,V1] = isosurface(X,Y,Z,OBJ,0);
    [F2,V2] = isocaps(X,Y,Z,OBJ,0,'below');
    %Combines isosurface and isocaps into one
    F3 = [F1;F2+length(V1(:,1))];
    V3 = [V1;V2];
    % Visualization
    P = patch('Vertices',V3,'Faces',F3,'FaceColor', ...
    'red','EdgeColor','none');
    view(3)
    camlight
    % STL export of independet files per gyroid.
    % Change current file path with desired file path.
    stlwrite(['C:\...filepath...\G1-T05' num2str(1) '.stl'],F3,V3);
    %Visualization
    axis equal
  • НаукаНаука

Комментарии • 105

  • @maxgoris7568
    @maxgoris7568 Год назад

    Thank you very much! I'm researching different lattice structures for orthopaedic applications. You have saved me a lot of time!

    • @RamiRouhana
      @RamiRouhana  Год назад +1

      You are welcome Max! Share this video with those who might be interested and let me know If I can further help or what additional video could be useful.

  • @Aamor321
    @Aamor321 Год назад +1

    Big Thanks for the wonderful Tutorial! Greetings from a german engineering student😊

    • @RamiRouhana
      @RamiRouhana  Год назад +1

      Thank you! Ich wünsche Ihnen viel Erfolg bei Ihrem Studium!

  • @user-MehrdadLotfi
    @user-MehrdadLotfi Год назад +1

    Very useful! Thank you!

  • @ZacLCroft
    @ZacLCroft Год назад +1

    Very helpful. Thanks so much!

  • @alessandraadrover6403
    @alessandraadrover6403 8 месяцев назад +1

    thank you so much. Very useful tutorial

  • @fereshteh-tn4kk
    @fereshteh-tn4kk Год назад

    Thanks for your great and helpful video. One question, can you let me know how can I make a foam with certain amount of porosity, for example 90%, please?

    • @RamiRouhana
      @RamiRouhana  Год назад

      That same question was asked below. I added the equation and the reference paper.

  • @jiyoungjung5461
    @jiyoungjung5461 4 месяца назад

    Hello, This video is awesome and very informative. I saw you posted approximated vf for the sheet as Vf=0.65*t. How did you obtain the equation? Is there a range of t that satisfies the approximation? Could you share the reference for the equation please?

    • @RamiRouhana
      @RamiRouhana  4 месяца назад +1

      Hello. I am glad you found the vid useful. The paper reference DOI is also in another comment. I can only assume that the equation holds until t=1.38

  • @fereshteh-tn4kk
    @fereshteh-tn4kk 9 месяцев назад

    Thanks for your great work
    I have a question, if it is possible to have a row of them, for example, 10 gyroid next to each other in a line

    • @RamiRouhana
      @RamiRouhana  9 месяцев назад

      With this script it would be easier to make on cell and make the repition using the generated STL on another software like meshlab.
      You could do it by adjusting the paremeters in direction x to compress 10 cells in and then later stretch it but the mesh will not be very homogenous. You could also try to define a larger volume for X direction, but I have not myself tried that.

    • @fereshteh-tn4kk
      @fereshteh-tn4kk 9 месяцев назад

      👍🏻🙏

  • @user-qp5dw7zt8k
    @user-qp5dw7zt8k 6 месяцев назад

    Thank you so much. I have a question.
    % Gyroid equation
    OBJ = cos(X/SFact).* sin(Y/SFact) + cos(Y/SFact).* sin(Z/SFact)...
    + cos(Z/SFact).* sin(X/SFact)+(-0.3);
    T = 0.5;
    OBJ = (OBJ-T).*(OBJ+T);
    In this part, how 'OBJ = (OBJ-T).*(OBJ+T);' this part creates 2 surfaces? It there any reference that you used?

  • @user-if2fk2sw8n
    @user-if2fk2sw8n Год назад

    Hello! Is it possible for me to alter the triangualtion (deciding if it should be very triangulated or just a little) options for the .stl file?
    Thanks.

    • @RamiRouhana
      @RamiRouhana  Год назад

      Hello , that is possible. Try to run the script with "Def = 40" changed to "Def = 80" . That defines the mesh density.

  • @pawanharsha3826
    @pawanharsha3826 4 месяца назад

    Hey,
    What we created the Gyroid TPMS structure using MS Lattice and have the STL file, any suggestions on how to convert the file to Step or IGES for performing FEA analysis. Im having a hard time cause there are no surfaces in the STL file.

    • @RamiRouhana
      @RamiRouhana  4 месяца назад

      I show these steps in this video. Using FreeCAD , or you could use Fusion 360 or there is an abaqus plugin "STL to solid". Watch until the end.

  • @maxonokram2275
    @maxonokram2275 4 месяца назад

    Hello! Rami Rouhana, I think this video is very informative. I want to know more about the volume calculation of gyroid. How I can edit the MATLAB code that you provided in the description to get the volume of the gyroid?
    I hope this comment finds you well.
    Thanks.

    • @RamiRouhana
      @RamiRouhana  4 месяца назад

      Hello. In the comments i posted the equation to calculate volume and the reference paper.
      I will add that to the video description.

  • @user-te6bl9og5v
    @user-te6bl9og5v Год назад +1

    Respected sir,
    Thank you for this outstanding video. It helps me lot for my research. I have some doubts regarding this video and it will be grateful if you help me on that.
    1. What is the thickness of this sheet type gyroid?
    2. How can I create network type gyroid with specific volume fraction?

    • @RamiRouhana
      @RamiRouhana  Год назад +1

      I am glad this video is helpful.
      1-The wall tickness if the sheet gyroid is not constant. You can estimate it by setting X and Y to 0 in the equation and calculate for Z value for the constant set to +t and -t.
      Example :
      sinx cosy + sin y cos z + sin z cos x = +0.1
      sinx cosy + sin y cos z + sin z cos x = -0.1
      These two equations give you a sheet gyroid.
      To find approximate thickness :
      sin 0 cos 0 + sin 0 cos z + sin z cos0 =+0.1
      sin 0 cos 0 + sin 0 cos z + sin z cos0 =-0.1
      Solve for Z and calculate the difference, you will have the sheet thickness in Z. It would be better to do the same for X and then also for Y. The smallest value it the closest to to average.
      2-This paper will help you with your questions.
      journals.sagepub.com/doi/10.1177/0278364920907697

    • @RamiRouhana
      @RamiRouhana  Год назад +1

      The volume fraction of the sheet-like structure can be controlled by its thickness that is constant throughout the structure and depends on the values chosen for the constant . The relationship between the level set constant and the volume fraction
      of the solid-network Gyroid reinforcement phase is as follows:
      Vf = 0.65c

    • @subhanath2914
      @subhanath2914 Год назад

      @@RamiRouhana thank you sir for this information

  • @user-if2fk2sw8n
    @user-if2fk2sw8n Год назад

    Thank you so much for your help. In this same code can I generate the gyroid's complementary volume so that it all sms up to a cube?
    How do I proceed

    • @RamiRouhana
      @RamiRouhana  Год назад

      I have done it yes. You can export the other geometry by tweaking the combine code at the end.

    • @user-if2fk2sw8n
      @user-if2fk2sw8n Год назад

      @@RamiRouhana % Clear all previous commands
      clear all
      close all
      clc
      % Variables you can change
      Sizex = 1; %average length of RVE
      Sizey = 1;
      Sizez = 1;
      Def = 60; %definition
      % Variables you shouldn´t change
      SFactx = (Sizex/2)/pi; %size factor of RVE
      SFacty = (Sizey/2)/pi;
      SFactz = (Sizez/2)/pi;
      A = SFactx*pi; %lowest and max coordinates of meshgrid
      B = SFacty*pi;
      C = SFactz*pi;
      Dx = A/Def;%definition factor
      Dy = B/Def;
      Dz = C/Def;
      % Generation of gyroids
      [X,Y,Z] = meshgrid(-A:Dx:A, -B:Dy:B, -C:Dz:C); %creates mesh grid
      % Gyroid equation
      OBJ =(A*B*C)-(cos(X/SFactx).* sin(Y/SFacty) + cos(Y/SFacty).* sin(Z/SFactz)...
      + cos(Z/SFactz).* sin(X/SFactx)+(0));
      OBJ1=(cos(X/SFactx).* sin(Y/SFacty) + cos(Y/SFacty).* sin(Z/SFactz)...
      + cos(Z/SFactz).* sin(X/SFactx)+(0));
      T = 0.5;
      OBJ =(OBJ-T);
      OBJ1=(OBJ1-T);
      % Isosurface and isocap
      [F1,V1] = isosurface(X,Y,Z,OBJ,0);
      [F2,V2] = isocaps(X,Y,Z,OBJ,0,'below');
      [F4,V4] = isosurface(X,Y,Z,OBJ1,0);
      [F5,V5] = isocaps(X,Y,Z,OBJ1,0,'below');
      %Combines isosurface and isocaps into one
      F3 = [F1;F2+length(V1(:,1))];
      V3 = [V1;V2];
      F6 = [F4;F5+length(V4(:,1))];
      V6 = [V1;V4];
      % Visualization
      P = patch('Vertices',V3,'Faces',F3,'FaceColor', ...
      'magenta','EdgeColor','none');
      view(3)
      camlight
      P = patch('Vertices',V6,'Faces',F6,'FaceColor', ...
      'green','EdgeColor','none');
      view(3)
      camlight
      %Visualization
      axis equal
      here is the code...i want to represent both the gyroid's and its complement inside the cube but with different colors...The graph is a little strange. Do you have any idea why?

  • @user-te6bl9og5v
    @user-te6bl9og5v 3 месяца назад

    Sir could you please tell me the version of this meshlab. In the latest meshlab the convert vertices and compact face is not available.

    • @RamiRouhana
      @RamiRouhana  3 месяца назад

      Hello, I currently have v2020.07

  • @user-lg4ho1mz8d
    @user-lg4ho1mz8d Год назад

    Thank you for useful content! I have a question. How can I make the structure has more finer unit cell??

    • @RamiRouhana
      @RamiRouhana  Год назад +1

      Hello , that is possible. Try to run the script with "Def = 40" changed to "Def = 80" . That defines the mesh density.

    • @user-lg4ho1mz8d
      @user-lg4ho1mz8d Год назад

      ​@@RamiRouhana Thank you for your answer! I mean unit cell is a repeated structure of the gyroid structure. So, I want to know if I can make a structure that has many smaller repeated structures. Sorry for confusing you.

    • @RamiRouhana
      @RamiRouhana  Год назад

      @@user-lg4ho1mz8d That would be possible in the script but very tricky, you will need to adjust the the values in the cos(x) to cos (x/3) and then increase resolution. You will get 3 cells in the x direction.

  • @chaiyasitpoompurk
    @chaiyasitpoompurk Год назад

    If it's other TPMS (example Diamond), how can I find Vf equation ?

    • @RamiRouhana
      @RamiRouhana  Год назад

      In the code, this is the Gyroid equation.
      % Gyroid equation
      OBJ = cos(X/SFact).* sin(Y/SFact) + cos(Y/SFact).* sin(Z/SFact)...
      + cos(Z/SFact).* sin(X/SFact)+(0);
      The Diamond Equation is :
      sin(X/SFact).* sin(Y/SFact).* sin(Z/SFact) +
      sin(X/SFact).* cos(Y/SFact).* cos(Z/SFact)+
      cos(X/SFact).* sin(Y/SFact).* cos(Z/SFact)+
      cos(X/SFact).* cos(Y/SFact) .* sin(Z/SFact) - (0);
      replace it in the code.

  • @camilomaturana9011
    @camilomaturana9011 8 месяцев назад

    Thank you so much. Your code was very useful for me 🙏. It is possible modify the code and make a cylinder fill with gyroid tpms unit cells? And if it is possible, how can i do that?

    • @camilomaturana9011
      @camilomaturana9011 8 месяцев назад

      In your code i made some modifications for get that cylinder, with booleans operations, but the result is a little bit bad, because the surface of the units cells are stranges, so i dont know how i can solve that.
      % Clear all previous commands
      clear all
      close all
      clc
      % Variables you can change
      SizeL = 1; %average length of RVE
      Def = 60; %definition
      % Variables you shouldn´t change
      SFact = (SizeL/2)/pi; %size factor of RVE
      A = 10*SFact*pi; %lowest and max coordinates of meshgrid
      D = A/Def; %definition factor
      % Generation of gyroids
      [X,Y,Z] = meshgrid(-A:D:A); %creates mesh grid
      % Gyroid equation
      OBJ = cos(X/SFact).* sin(Y/SFact) + cos(Y/SFact).* sin(Z/SFact)...
      + cos(Z/SFact).* sin(X/SFact);
      T = (-0.05*(X.*X + Y.*Y) + 1.25);
      OBJ = OBJ >= 0 ;
      % Extrusion
      ExtrusionHeight = 10
      CylinderRadius = 5
      extrusionMask = Z CylinderRadius^2;
      cylindricalShape = cylinderMask & extrusionMask;
      % Combine gyroid structure with extrusion and cylindrical shape
      ResultSurface = OBJ | cylinderMask;
      % Isosurface and isocap
      [F1, V1] = isosurface(X, Y, Z, ResultSurface, 0);
      [F2, V2] = isocaps(X, Y, Z, ResultSurface, 0, 'below');
      % Combine isosurface and isocaps into one
      F3 = [F1; F2 + length(V1(:, 1))];
      V3 = [V1; V2];
      % Visualization
      figure;
      P = patch('Vertices', V3, 'Faces', F3, 'FaceColor', 'blue', 'EdgeColor', 'none');
      view(3);
      camlight;
      % STL export of the entire structure
      % Change current file path with desired file path.
      % Visualization
      axis equal;

    • @RamiRouhana
      @RamiRouhana  8 месяцев назад

      @@camilomaturana9011 You are welcome. What is the code you added ?

    • @camilomaturana9011
      @camilomaturana9011 8 месяцев назад

      @@RamiRouhana This parts (The code is up):
      A = 10*SFact*pi; %lowest and max coordinates of meshgrid (This for make an a repetition of the unit cells in the space)
      OBJ = OBJ >= 0 ;
      % Extrusion
      ExtrusionHeight = 10
      CylinderRadius = 5
      extrusionMask = Z CylinderRadius^2;
      cylindricalShape = cylinderMask & extrusionMask;
      % Combine gyroid structure with extrusion and cylindrical shape
      ResultSurface = OBJ | cylinderMask;
      % Isosurface and isocap
      [F1, V1] = isosurface(X, Y, Z, ResultSurface, 0);
      [F2, V2] = isocaps(X, Y, Z, ResultSurface, 0, 'below');

  • @user-te6bl9og5v
    @user-te6bl9og5v 3 месяца назад

    Sir could you please tell me which version of FreeCAD software you r using?

  • @user-te6bl9og5v
    @user-te6bl9og5v 18 дней назад

    Sir could you please tell me which version or matlab you have used. Actually the stlwrite is not working in my matlab 2024b.I have already addon stl write

    • @RamiRouhana
      @RamiRouhana  11 дней назад

      I tested on 2024b , it appears to work. Place the STL write code in the same folder where the script is.

  • @user-te6bl9og5v
    @user-te6bl9og5v 3 месяца назад

    Thank you for your support.
    I have some doubt in my mind and I will feel grateful if you please resolve these issues.
    1. After creation of a part when I am not to select any face, which is required for assembly.
    2. I want to simulate the structure in abaqus. Which file format I should save after freeCAD

    • @RamiRouhana
      @RamiRouhana  3 месяца назад

      1-What aeesmbly do you mean ??
      2- save as 'SAT" file type

    • @user-te6bl9og5v
      @user-te6bl9og5v 3 месяца назад

      @@RamiRouhana I want to assembly two different TPMS structures but when I insert this in FreeCAD software I am not able to select any face of the structures to mate 2 faces

    • @user-te6bl9og5v
      @user-te6bl9og5v 3 месяца назад

      @@RamiRouhana .sat file option is not available in freecad save types

    • @RamiRouhana
      @RamiRouhana  3 месяца назад

      @@user-te6bl9og5v try IGS and STP

    • @user-te6bl9og5v
      @user-te6bl9og5v 3 месяца назад

      @@RamiRouhana thank you sir.

  • @user-if2fk2sw8n
    @user-if2fk2sw8n Год назад

    Thank you. I would like to visualise the uncombined nodes cut at the edges. How do I do that?

    • @RamiRouhana
      @RamiRouhana  Год назад

      I am sorry, I cannot help you with that.

    • @user-if2fk2sw8n
      @user-if2fk2sw8n Год назад

      @@RamiRouhana I just want to know which part of the code to delete so the gyroïd does not become a smooth uniform surface

    • @RamiRouhana
      @RamiRouhana  Год назад

      @@user-if2fk2sw8n Try commenting out the isosurface section.

    • @user-if2fk2sw8n
      @user-if2fk2sw8n Год назад

      @@RamiRouhana But if i delete that isosurface line it will impact the "combine" and "visualisation" parts.

  • @user-kp1ko9dg3s
    @user-kp1ko9dg3s 8 месяцев назад

    Thanks a lot for the video. Is it possible to calculate the surface area and volume of the sheet gyroid in matlab?

    • @RamiRouhana
      @RamiRouhana  8 месяцев назад +1

      The volume it is possible by the equation in the video description. Surface area should be possible but I do it on meshlab.

    • @user-kp1ko9dg3s
      @user-kp1ko9dg3s 8 месяцев назад

      ​@@RamiRouhana
      Thanks for your reply.
      Is F3 representative of the surface area of the gyroid, and is V3 the corresponding volume?
      Is there a direct relationship between the T value and the thickness of the sheet gyroid?

    • @user-kp1ko9dg3s
      @user-kp1ko9dg3s 8 месяцев назад

      From your previous comment -
      These two equations give you a sheet gyroid. To find approximate thickness :
      sin 0 cos 0 + sin 0 cos z + sin z cos0 =+0.1
      sin 0 cos 0 + sin 0 cos z + sin z cos0 =-0.1
      Solving these 2 equations we get z= arcsin(t) & z= arcsin(-t). so arcsin(t) should be the thickness of the sheet gyroid, right?

    • @RamiRouhana
      @RamiRouhana  8 месяцев назад

      The thickness is not a constant, this is the value you get near the center of the cube face. The deviation becomes larger with larger T values.@@user-kp1ko9dg3s

    • @RamiRouhana
      @RamiRouhana  8 месяцев назад

      F is the faces , and V are the vertices. @@user-kp1ko9dg3s

  • @user-qp5dw7zt8k
    @user-qp5dw7zt8k 6 месяцев назад

    Thank you so much! I have a question.
    % Gyroid equation
    OBJ = cos(X/SFact).* sin(Y/SFact) + cos(Y/SFact).* sin(Z/SFact)...
    + cos(Z/SFact).* sin(X/SFact)+(-0.3);
    T = 0.5;
    OBJ = (OBJ-T).*(OBJ+T);
    In this part, I can't understand how "OBJ = (OBJ-T).*(OBJ+T);" works to create 2 isosurfaces. Is there any reference which you used?
    Thank you ^^

    • @RamiRouhana
      @RamiRouhana  6 месяцев назад

      Hello. The equation of a gyroid is equal to a constant. By reducing or increasong the constant, the gyroid surface shifts like an offset but in 3D. So offsetting equally give a symmetric thick shell .

    • @user-qp5dw7zt8k
      @user-qp5dw7zt8k 6 месяцев назад

      @@RamiRouhana Thank you. Sir
      And I have one more problem in FreeCAD
      I followed your order well but when I do this function
      Part - Convert to Solid
      There is a error msg : because Shape is not a shell
      I don't know why.... I really created shape from mesh first but I can't make a solid from shape

    • @RamiRouhana
      @RamiRouhana  6 месяцев назад

      @@user-qp5dw7zt8k you have to click on the part name on the left sidebar before you do the conversion.

  • @user-te6bl9og5v
    @user-te6bl9og5v Год назад

    Respected sir,
    Thank you for such a helpful tutorial. It helps me lot in my research. I am facing two issues regarding gyroid coding:
    1. How can I insert the unit of gyroid in this code?
    2. I want to create a row of gyroids then what are the changes I need to do?
    It will be helpful for me if you help me regarding that.

    • @RamiRouhana
      @RamiRouhana  Год назад

      1-What do you mean by unit?
      2- create the stl and copy in a row using fusion software.

    • @subhanath6405
      @subhanath6405 Год назад

      Sir unit means I need 20 cm length gyroid

    • @RamiRouhana
      @RamiRouhana  Год назад

      @@subhanath6405 you can scae up the stl to any size you need after genrating it.
      Use fusion software or Meshlab.

  • @user-ed9pj4eu6g
    @user-ed9pj4eu6g Год назад

    hello, Can I ask you a question?
    The following error occurs when executing your code.
    " Input argument must be a triangulation object "
    Maybe the cause of the problem is 'stlwrite'.
    How can I solve this problem?

    • @RamiRouhana
      @RamiRouhana  Год назад

      Hello. When the error occurs it indicates usually the line of code where the error is. The forums suggest it is an error related to stlwrite yes. Make sure you install the plugin using Matlab add-ons.
      It could be dependent on the matlab version you are using also.

    • @user-ed9pj4eu6g
      @user-ed9pj4eu6g Год назад +1

      @@RamiRouhana oh, I looked at the video carefully again, You've already explained it
      thank you so much. I solved the problem :)

  • @jonathanvillada9330
    @jonathanvillada9330 Год назад

    Hi Rami,
    When I get to the last step of converting the surfaces to a solid I run into an error on FreeCAD. I select G1_T05_50K001 > Part > Convert to solid and then the error reads "Cannot convert model because Shape is not a shell. Any recommendations on what to do? I tried exporting it after the fact and my program just frozen indefinitely.

    • @RamiRouhana
      @RamiRouhana  Год назад

      Hello , try checking mesh quality on meshlab and check if there are holes or bad mesh. Often there are duplicate surfaces or independent nodes.

    • @jonathanvillada9330
      @jonathanvillada9330 Год назад +1

      @@RamiRouhana Do you know if meshlab changed some of their settings? I could not find compact faces and vertices in their submenus so I went straight for removing and merging.

    • @RamiRouhana
      @RamiRouhana  Год назад

      @@jonathanvillada9330 there should be other software for mesh correction. Meshmixer maybe.

  • @user-if2fk2sw8n
    @user-if2fk2sw8n Год назад

    One more question ...whenever I try to save as .stl file the program tells me "Error using stlwrite
    Input argument must be a triangulation object." how do I solve this?"

    • @RamiRouhana
      @RamiRouhana  Год назад

      it could be that you are using a mesh sensity that is low.
      Try first to run the code as it is and see if the STL is generated.
      If it works and then give errors due to the changes you made, then the changes you have made are causing the error.

    • @user-if2fk2sw8n
      @user-if2fk2sw8n Год назад

      @@RamiRouhana The STL is not generated even with your original file. How do I increast the mesh sinsity?

    • @RamiRouhana
      @RamiRouhana  Год назад

      @@user-if2fk2sw8n you need to instal the stl generation plugin in the right folder.

  • @LorenzoPiccinini-um6hd
    @LorenzoPiccinini-um6hd 5 месяцев назад

    I tried to save the file using stl but it requested the triangulation I don't know how to fix it could you please help me?

    • @RamiRouhana
      @RamiRouhana  5 месяцев назад

      Hello. Adjust the mesh density, but also check the other comments. I provided some solutions.

  • @relab5346
    @relab5346 5 месяцев назад

    Can I save the file as Tiff rather than STL, also can I change the solid of the gyrode to be made of small particles of spheres

    • @RamiRouhana
      @RamiRouhana  5 месяцев назад

      Yes there are methods if you export node coordiates you can make what is called SPH in Abaqus. Or you can adjust the script in matlab to generate a sphere at the location of nodes, there are tutorials of that.

    • @relab5346
      @relab5346 5 месяцев назад

      Thanks for your reply please can you explain more, I'm a beginner in Matlab.

    • @RamiRouhana
      @RamiRouhana  5 месяцев назад

      @@relab5346 It is not an easy task in matlab. It is better if you import the CAD to abaqus. Look for tutorials to convert the CAD to particles SPH in abaqus.
      For matlab , this might help arxiv.org/abs/2209.05189

  • @kanav1998
    @kanav1998 5 дней назад

    Hi, I had two questions and was wondering if you could help me out.
    1. How do I generate the gyroids but instead of the walls in the sheet type, I want the paths inside the double gyroids.
    2. I want to control the thickness of the paths as well.
    Thanks in advance!

    • @RamiRouhana
      @RamiRouhana  5 дней назад

      Hello,
      1- you should switch the boundary limits and the volumes you combine at the end of the code. It is doable, if you break down the code and the functions in it.
      2-The thickness can always be controlled by the T parameters.

    • @kanav1998
      @kanav1998 5 дней назад

      @@RamiRouhana hey really appreciate the quick reply! Just that I am not very good at MATLAB. I fear if I break down the code I’ll end up actually breaking it.

    • @RamiRouhana
      @RamiRouhana  5 дней назад

      @@kanav1998 just experiment woth the code at the end that combines the surfaces. Keep an oroginal backup of the script. Understanding better the code will allow you to manipulate it easier.

  • @user-te6bl9og5v
    @user-te6bl9og5v 11 месяцев назад

    sir could you please tell me how can I can convert it into 3d solid meshed?

    • @user-te6bl9og5v
      @user-te6bl9og5v 11 месяцев назад

      Actually I want to apply load on one face and fixed in other end in matlab.

    • @RamiRouhana
      @RamiRouhana  11 месяцев назад

      @@user-te6bl9og5v I explain mesh conversion on FreeCAD at the end of the video.

    • @user-te6bl9og5v
      @user-te6bl9og5v 11 месяцев назад

      Thank you sir for your guidance. I am looking that is their any way we can convert this to solid in matlab itself? @@RamiRouhana

  • @user-te6bl9og5v
    @user-te6bl9og5v 11 месяцев назад

    Respected sir,
    In my research I need to check any point within that TPMS or not? But in that code I am not able to do that. I will be appreciated if you kindly help me to correct that.
    %clear all previous commands
    clear all
    close all
    clc
    %variable you can change
    SizeL = 5;
    Def = 160;
    SFact = (SizeL/2)/pi;
    A = SFact*pi;
    D = A/Def;
    [X,Y,Z] = meshgrid(-A:D:A);
    OBJ = cos (X/SFact)+cos (Y/SFact)+cos (Z/SFact) + (0);
    T = 0;
    OBJ = (OBJ);
    [F1,V1] = isosurface (X,Y,Z,OBJ,0);
    [F2,V2] = isocaps(X,Y,Z,OBJ,0,'above');
    F3 = [F1;F2+length(V1(:,1))];
    V3 = [V1;V2];
    P = patch ('Vertices',V3, 'Faces',F3,'FaceColor','blue','EdgeColor','none');
    K = [0 0 0];
    in = intriangulation(V3,F3,K)
    if in==0
    fprintf("outside");
    else
    fprintf("inside");
    end
    view(3)
    camlight
    axis equal
    THANK YOU

    • @RamiRouhana
      @RamiRouhana  11 месяцев назад

      I am sorry. I cannot help you at the momet with a specific coding task. You will need to export surface node coordinates and write a script to compare positions (In/Out).

  • @user-qp5dw7zt8k
    @user-qp5dw7zt8k 5 месяцев назад

    Hi sir
    I followed your order correctly but there is error in FreeCAD conversion
    When I click "convert to solid", I got this error message.
    File "", line 2, in
    : Shape is not a shell
    20:11:50 Cannot convert GyroidD_40_t_0_T_0_5_____50K001 because Shape is not a shell.
    Did you really succeed to do this order?
    Thank you so much

    • @RamiRouhana
      @RamiRouhana  5 месяцев назад

      Try to adjust the mesh density you generate in matlab , your mesh might have defects in it. As mentioned in the video, the step in Meshlab for mesh optimization is very helpful, and in some cases necessary.

    • @user-qp5dw7zt8k
      @user-qp5dw7zt8k 5 месяцев назад

      @@RamiRouhana
      I input "40" mesh density in matlab.
      And I optimized faces into 50000 faces in Meshlab.
      However I got this error....TT

    • @RamiRouhana
      @RamiRouhana  5 месяцев назад

      @@user-qp5dw7zt8k have you adjusted the t value or are u following the exact same steps in the vid. I would say try Fusion360 to convert mesh to CAD . Maybe the new FreeCAD has a code problem.

  • @GuHong98
    @GuHong98 Год назад

    Hello Rami, great video. If I were to 3D print structures like this do you know how to fill the Gyroid walls? The model right now is hollow.
    Thank you very much :)

    • @RamiRouhana
      @RamiRouhana  Год назад +1

      Hello Alexandre. For printing you do not need to do any changes to the exported STL file. The slicer for printing fills the volume based on you print settings, number of walls and infil precentage if you are using FDM. If you are using SLM or SLA or SLS additive technology the STL model is assumed a solid in the slicer.