Jump to content

Flow Calculations


Touradnik9

Recommended Posts

Posted · Flow Calculations
1 hour ago, Touradnik9 said:

Hello,

 

I was wondering how Cura computes the E values for the gcodes.  What type of cross section does the software assume for the extrudate mass?

 

Thanks!

 

Tim

 

It assumes the lines are rectangular with a cross sectional area of layer-height * line-width.

  • Like 1
Link to post
Share on other sites

Posted · Flow Calculations
10 minutes ago, yellowshark said:

I am no expert on this but with a circular nozzle would Cura assume the cross section is rectangular?

 

The nozzle shape doesn't come into it. The settings that do influence the extrusion amounts are:

 

Line width

Layer height

Flow multipliers

Filament diameter

 

And then there's other funky stuff like overlap compensation, wall gap filling, thin walls, spiralization, etc. that all mess with the extrusion rates.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    When you say the nozzle shape does not come into it could you expand on that a bit, it sure takes a lot more concrete to fill a rectangular column in a building than it does a circular column. I would have thought nozzle shape should come into it.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    The nozzle is just a pipe that delivers some amount of filament per unit of nozzle distance moved. Although the diameter of the nozzle will affect the quality of the extruded line, it doesn't affect how much plastic needs to be squirted through it for a given line width/height. If the hole is bigger, the flow velocity would be lower compared to a small hole. The actual volume of the extrusion doesn't change when the nozzle diameter is changed.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    This took me some time to understand, but as I see it now, it is the *printed* sausage that counts, not the nozzle.

     

    The extruded amount has to fill the printed sausage. So, ideally if there would be no air trapped between the sausages, and at 100% infill, it would print perfectly *rectangular bars* with dimensions: line-width x line-height x traveled distance. I guess that is where this calculation comes from?

     

    The nozzle-opening limits accuracy: too wide, and it can't print fine lines; too narrow, and it can't extrude enough material.

     

    Is this correct?

  • Link to post
    Share on other sites

    Posted · Flow Calculations
    2 minutes ago, geert_2 said:

    This took me some time to understand, but as I see it now, it is the *printed* sausage that counts, not the nozzle.

     

    The extruded amount has to fill the printed sausage. So, ideally if there would be no air trapped between the sausages, and at 100% infill, it would print perfectly *rectangular bars* with dimensions: line-width x line-height x traveled distance. I guess that is where this calculation comes from?

     

    The nozzle-opening limits accuracy: too wide, and it can't print fine lines; too narrow, and it can't extrude enough material.

     

    Is this correct?

     

    Yes, as far as I know, that is correct. The nozzle size needs to be suitable for the line widths being printed but other than that it doesn't influence the extrusion rate.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    Hi Everyone!

     

    Wow! Good replies!

     

    There are actually a lot of things that can influence the Gcode values, but if we stick with the basics and simplest of situations:

    100% infill

    fixed layer height

    user-input extrusion width OR nozzle diameter

    filament diameter

    (flow multipliers are just arbitrary numbers multiplied by the following equations)

     

    You will find that open-source slicers, like Slic3r, have values computed as such:

     

    image.png.a2031bb472a8aad45eda4e22854ffc75.pngSlic3r flow calculations, w = width, h = layer height, D = filament diameter

     

    Where the E-value would be the volume of the path length (cross section area * distance traveled in GCode) divided by the area of the filament diameter (pi*D^2/4)

    Cross-section shape is computed is a rectangle with semi-circular ends https://manual.slic3r.org/advanced/flow-math

     

    Another open-source software, MatterControl, has a different formula:

    Area extrusion = Nozzle diameter * layer height

    E value = diameter*layer height* distance / filament cross sectional area

     

    Depending on the slicer, you will get different extrusion values and different results. In fact, if you do the math with the system of equations, you will find a conversion factor between slic3r and matter control, assuming a fixed (equal) layer height, as:

     

    Nozzle diameter MatterControl = width-height*(1-pi/4)

     

    or rearranging,

     

    extrusion width in slic3r = nozzle diameter diameter Matter Control + h(1-pi/4)

     

    My question stems from one topic:

     

    The E values in the gcode are calculated, and the calculations vary immensely between slicers based on the cross-sectional geometric assumptions used for the deposited, extruded mass.  This is an issue with all slicers that utilize GCode. In my opinion, it would offer much more flexibility for advanced users if these E values can be manually entered and not calculated.

     

    So, I will end with this: does anyone know the cross-section assumed by Cura, or any other variables that must be included in the calculations?

     

     

     

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    Burtoogle, I saw your reply, thanks! So it is a rectangular cross section, Area = width * layer height.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    Sorry I still do not understand, or rather I disagree. A 0.4 rectangle has a greater surface area than a 0.4 circle. Therefore if the calculation is based on a rectangular profile Cura will set the pressure/feed speed to deliver X amount of material per sec. If the calculation is based on a circular profile  I would expect Cura to deliver Y amount of material where Y is less than X. So in your scenario Cura is delivering too much material. That would suggest that either you end up with over-extrusion or a nozzle blockage. I am no expert, I never studied fluid mechanics, but I do know that the filament that extrudes from my nozzle is circular not rectangular. So why do the Cura programmers do their calcs on a rectangular profile which does not exist?

     I am happy to be told I am wrong, lol if it is explained, but right now it does not seem logical to me.

  • Link to post
    Share on other sites

    Posted · Flow Calculations
    22 hours ago, burtoogle said:

    snip>>>   The actual volume of the extrusion doesn't change when the nozzle diameter is changed.

    Err yes it does! If you change from a 0.4 to 0.8 nozzle you will change your line width which will increase the volume of extrusion per sec. That is why you uses a larger nozzle, predominantly to reduce print time.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    Hello,

     

    No, you are exactly right. Cura will overestimate with a rectangular cross section compared to a circular cross-section.

     

    So, if you are extruding more material with Cura's estimate, something else has to change.  That something is the distance between path spacings ( I would guess, but Cura's code in not open source).

     

    If you look at my post on Slic3r versus MC, the path spacing between adjacent extrusions are also different.  Slic3r calculates path spacing as a function of both layer height and extrusion width, while in MC it is equal to the nozzle diameter. Both calculations are important when considering flow through the nozzle

     

    But let's think about this: the 'rectangular' and 'circular' shapes for a second.

     

    There is a huge difference between the geometry that the slicer assumes for flow calculations and reality.  The slicer simply assumes a geometric cross section to aid in the calculations of the E values.  This is a problem inherent in the fact that FDM printers utilize GCode to produce parts. Without this geometric consideration, it would be impossible to predict the E values, which are based on the conservation of volumetric flow rate.

     

    So when it is stated that the filament extruded is 'circular' and 'not rectangular', I cannot see how that is possible. I think the correct answer would be neither because the shape is extremely variable and dependent on a huge number of variables, such as material flow, ambient temperature, nozzle temperature, head speed, layer height, etc.  The shape changes as these variables change. From experience, I would say the shape is ovular, and changes with respect to these variables.  As layer height is increased, the cross section approaches that of a circle.  As layer height decreases, the cross section approaches that of slic3r's cross section.

  • Link to post
    Share on other sites

    Posted (edited) · Flow Calculations
    10 minutes ago, Touradnik9 said:

    I would guess, but Cura's code in not open source

     

    I guess you are saying that Cura's code is not open source. Well it is and if you want to check the calculations just look in https://github.com/Ultimaker/CuraEngine

    Edited by burtoogle
  • Link to post
    Share on other sites

    Posted · Flow Calculations
    3 hours ago, Touradnik9 said:

    Burtoogle, I saw your reply, thanks! So it is a rectangular cross section, Area = width * layer height.

     

    Correct.

     

  • Link to post
    Share on other sites

    Posted · Flow Calculations
    29 minutes ago, yellowshark said:

    Err yes it does! If you change from a 0.4 to 0.8 nozzle you will change your line width which will increase the volume of extrusion per sec. That is why you uses a larger nozzle, predominantly to reduce print time.

     

    Yes, the extrusion rate will go up if you change the line width but it's the change in line width that changes the extrusion rate not the fact that the hole is bigger/smaller. It may be that the line width is somehow automagically set from the nozzle hole size but that's an indirect effect.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    @yellowshark - Cura doesn't care if the nozzle is round, square, star shaped nor what it's cross section is when calculating the amount of filament needed to extrude a line of filament.  If the nozzle diameter is 0.8 but the line width is 0.4 it will extrude the right amount to fill the volume of that printed "line" of filament.

     

    Back to your concrete analogy - if you are pouring concrete into a sonotube, it doesn't matter how big the chute is - it matters how much volume the sonutube takes up.  The nozzle in this analogy is the chute only.

     

    In real life of course it matters a little but Cura doesn't worry about nozzle shape.

     

    Also note that the spacing of the "lines" is equal to the line width.  So with 100% fill it should work very well.

     

     

  • Link to post
    Share on other sites

    Posted (edited) · Flow Calculations

    I made a quick drawing to illustrate how I understood it ("a picture says more than..."):   🙂

     

    It does not really matter what the diameter of the nozzle is: it just has to be able to fill the gap with molten plastic. And that gap is: line-width x layer-height x line-length (=red bar in the drawing). Although of course a 1.0mm nozzle can't draw a line of 0.4mm wide, and neither can a 0.1mm nozzle. So nozzle-diameter and line-width should be about the same, both about 0.4mm, to get decent results.

     

    The extruder has to push that volume of filament through the nozzle. In calculating how far to move the filament, it will have to consider the filament diameter 2.85mm, travel distance of the filament (e-steps?), and maybe losses due to "partial slipping" in the feeder. I think...

     

    nozzle_layer_volume2.thumb.jpg.9f14504c447f77c6b35a4cefbf88b64b.jpg

     

    Edited by geert_2
    • Like 1
    Link to post
    Share on other sites

    Posted · Flow Calculations

    This is an ideal world, which the slicer looks at to make its calculations.  However, in reality, the cross-section will never be truly rectangular.

     

    The center-to-center spacing between lines should therefore be slightly less than the extrusion width.  Otherwise, the planar interface between lines would be exactly planar contact with minimal bonding between adjacent paths.  But of course, for calculations I have seen that it makes the calculations easier when the spacing is equal to line width.  This would allude to the fact that the width is actually larger than what is being used by the slicer.

    • Like 1
    Link to post
    Share on other sites

    Posted · Flow Calculations

    The E values of all FDM, filament based printers are based on the same equation. That is, the conservation of volumetric flow rate:

    image.png.e3ee1ba64e0dbf704f97ecd50b94d7dc.png

    where 'deposited' referes to the material exiting the nozzle.

     

    The tricky thing here is that different slicers use different equations. I have found that the biggest difference is in the cross sectional area of the extruded mass, i.e. Aextrusion.

    image.png.f621ba8caac64373126ff7157be72a66.png

     

    That is why I started this post.

     

    The next biggest equation is how path spacing is calculated between adjacent paths. You need both equations to understand how the material will flow out of the nozzle, and how the material will bond with adjacent paths.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    Thanks for that @gr5. I am not sure the sonotube/shute point is relevant to the point I was trying to make, which is that firstly you need more concrete to build a rectangular column than a circular column of the same dimension. A 15ft circular column with a diameter of 2 ft needs 47.1 cubic feet of concrete . A 2 ft square column needs 60 cubic feet.

    So if Cura uses a rectangular profile when doing its calculations – which was the stated point that I was questioning, it was not my point – then with a circular delivery profile (fine maybe it is elliptical but lol it looks circular to me) then are you not over-extruding by 27%?

    Also I remain dubious that 0.8mm nozzle would draw a 0.4mm line. A couple of years back I discovered my printer was drawing 0.45mm lines - with everything in Cura setup for 0.4mm lines - which I assumed was due to either wear and tear or manufacturing tolerance and so I changed Cura to 0.45 nozzle and line width and improved my prints.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    I think @yellowshark is confusing the plastic delivery system (the nozzle opening) to the plastic forming system. This is what @geert_2 was trying to get at with his drawing.

     

    Nozzles are not all shaped the same, but most 0.4 mm nozzles have a flat surface that is 2-3x the diameter of the hole. For the sake of this conversation, let's call it a 1 mm diameter surface with the 0.4 mm hole in the middle. Let's also assume a 0.1 mm layer height.

     

    Assume for a moment that the head is not moving, and that we can exactly push specific amounts out the nozzle (The 3D printing equivalent of the physicist's, "assume a spherical cow"). The extruder pushes exactly 0.1 mm of plastic from the nozzle. You now have a cylinder of plastic, 0.1 mm tall x 0.4 mm diameter, or .0126 mm³. This geometry is completely defined by the nozzle shape. Also assume a square nozzle doing the same thing: you have a square 0.4mm on a side--again defined by the nozzle shape.

     

    Still without moving the head, push more plastic out the nozzle. The plastic will expand within the space defined between the print bed and the bottom of the nozzle. By the time the circular nozzle has filled the 0.1 x 1 mm disc under the nozzle, you will have pushed out 0.0785 mm³ of plastic and it will still be a circular shape. Is this because of the circular nozzle? Let's see.

     

    With the square-holed nozzle, as you continue pushing plastic out, there are no straight vertical sides to constrain the shape. As the edges are pushed out, the pressure will be higher on the middles of the walls than on the corners. Thus you will see the sides start to curve and trend toward a cylinder.

     

    Therefore the shape of the extruded splotch of plastic is not going to stay the shape of the nozzle. The circular patch is a special case where it does.

     

    Now repeat the thought experiment with the head in motion. Once the initial 0.1 x 0.4 mm cylinder has been extruded, the head starts moving at some speed v, for some time t. We don't want to expand the width of the already-deposited filament, so the moves look like this:

    image.png.d95a1a1533f96f1c366a9cdaceb6aff1.png 

    The amount of material needed to fill the new space is exactly 0.1 x 0.4 x vt (assuming vertical sides of the printed area).

    It does not matter whether the nozzle opening is a circle or a square. The nozzle shape only determines whether the end of the line is rounded or squared. The area of the openings is different, so the speed of material flowing through the nozzle is slightly different, but the amount of plastic is the same.

     

     

     

     

     

     

    image.png

  • Link to post
    Share on other sites

    Posted · Flow Calculations
    On 6/21/2019 at 7:44 AM, yellowshark said:

    Thanks for that @gr5. I am not sure the sonotube/shute point is relevant to the point I was trying to make, which is that firstly you need more concrete to build a rectangular column than a circular column of the same dimension. A 15ft circular column with a diameter of 2 ft needs 47.1 cubic feet of concrete . A 2 ft square column needs 60 cubic feet.

     

     

    So if Cura uses a rectangular profile when doing its calculations – which was the stated point that I was questioning, it was not my point – then with a circular delivery profile (fine maybe it is elliptical but lol it looks circular to me) then are you not over-extruding by 27%?

    So Cura does care if the filament is round versus if the filament is square because it calculates the flow coming out of the nozzle assuming that it knows the diameter of the filament going into the feeder and it knows the linear distance the filament has moved so it calculates the volume of filament extruding that way.

     

    Cura doesn't care about the diameter of the nozzle - it assumes that the volume of filament going through the feeder matches that coming out of the nozzle (no leaks).

     

     

     

    On 6/21/2019 at 7:44 AM, yellowshark said:

     

    Also I remain dubious that 0.8mm nozzle would draw a 0.4mm line. A couple of years back I discovered my printer was drawing 0.45mm lines - with everything in Cura setup for 0.4mm lines - which I assumed was due to either wear and tear or manufacturing tolerance and so I changed Cura to 0.45 nozzle and line width and improved my prints.

    This is absolutely true.  Cura relies on you telling it a reasonable value for line width.  A value similar to your nozzle width.  

     

  • Link to post
    Share on other sites

    Posted · Flow Calculations
    13 hours ago, johnse said:

    I think @yellowshark is confusing the plastic delivery system (the nozzle opening) to the plastic forming system. image.png.d95a1a1533f96f1c366a9cdaceb6aff1.png 

     

     

     

    The ends of each line above require slightly different amounts of plastic.

     

    I believe some other slicers actually do worry about this issue.  If you assume there are never non-extruding moves then it only matters at the very start of the print and the very end.  But of course there are lots of non-extruding moves.  Like when filling gaps in walls.

     

    I believe I read somewhere that slic3r or maybe s3d takes into account the roundedness of the start and/or end of each trace.  I suppose this would be good particularly for huge printers with say 100mm (4 inch) nozzles and larger.

  • Link to post
    Share on other sites

    Posted · Flow Calculations

    Equating the diameter of the nozzle to the length of a side for a square nozzle does not make a lot of sense.  The key parameter here is area.

     

    Remember, we want the volumetric flow rate to be equal. So, for a nozzle with diameter, D, the equivalent square nozzle would have side length S equal to:

     

    S = D*sqrt(pi/4)

     

    So when you say 'the lines require slightly different amounts plastic', it is because the dimensions of the square nozzle are incorrect to begin with.  According to this equation, for any linear distance of extruded filament, the amount of material will be exactly the same.

     

    The shape of the extrusion will be slightly different of course, but that is beyond the topic of this thread I think. That is a much more complex issue.  From a slicing perspective, the calculation is important to determine the rate and distances of the extruded filament in the gcode.

     

    The biggest issues would be at the start and stop points, but the differences can be fixed or 'covered up' by adjusting your overlap percentages.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 26 replies
    ×
    ×
    • Create New...