Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Max volumetric flow rate per printer #3972

Closed

Conversation

mjonuschat
Copy link
Contributor

Allow defining a max volumentric flow rate in the printer settings. This accounts for the fact that max volumentric flow is mostly defined by physical printer features (nozzle type, hotend and extruder choice) as well as filament properties (material, nozzle temp).
The filament properties today already allow limiting the flow rate but this is cumbersome if you own multiple printers that are limited by their extruder or hotend and not by material properties, resulting in requiring multiple filament profiles (with per printer limits) or multiple process settings (with different speeds).

With the per printer setting the max speed will be limited to the lower number derived from printer and filament settings.
A printer setting of 40mm3/s and a filament setting of 11mm3/s will limit to 11mm3/s while a filament setting of 40mm3/s and a printer setting of 15mm3/s will limit to 15mm3/s.

Settin the printer limit to 0 (the default value) will disable limiting based on printer setting.

@mjonuschat
Copy link
Contributor Author

This should resolve #2395

@igiannakas
Copy link
Contributor

If I’m reading the code right, if both filament and extruder max flow rate is set it will pick the filament one, correct? Should it be using the minimum of the two instead?

@mjonuschat
Copy link
Contributor Author

It’s already picking the lower one of the two….the two min operations are executed one after the other.
Lets assume starting value of speed is 400, max_volumetric_flow_rate comes down to 200 and filament flow rate to 300:

  1. First min operation (printer): speed = min(400,200). Speed is reduced to 200
  2. Second min operation (filament): speed = min(200,300). Speed stays at 200

With the filament rate being more strict (assuming speed = 400, max_volumetric_flow_rate=300, filament=200):

  1. First min: speed = min(400,300). Speed is reduced to 300
  2. Second min: speed = min(300,200). Speed is further reduced to 200

@igiannakas
Copy link
Contributor

Ah great, sorry didn’t read it as thoroughly :)

@bistory
Copy link
Contributor

bistory commented Feb 6, 2024

It’s already picking the lower one of the two….the two min operations are executed one after the other. Lets assume starting value of speed is 400, max_volumetric_flow_rate comes down to 200 and filament flow rate to 300:

1. First `min` operation (printer): speed = min(400,200). Speed is reduced to 200

2. Second `min` operation (filament): speed = min(200,300). Speed stays at 200

With the filament rate being more strict (assuming speed = 400, max_volumetric_flow_rate=300, filament=200):

1. First `min`: speed = min(400,300). Speed is reduced to 300

2. Second `min`: speed = min(300,200). Speed is further reduced to 200

Seems logical. So for Creality stock profiles where we have a limitation for speedy printers, we will need to raise volumetric flow of the filaments then use your new parameter in each printer profile so each Creality printer won't be stuck to anemic volumetric flows...
This will provide cleaner and more straightforward use of Orca (most users use the Creality Generic PLA profile and don't change volumetric flow).

@mjonuschat
Copy link
Contributor Author

Seems logical. So for Creality stock profiles where we have a limitation for speedy printers, we will need to raise volumetric flow of the filaments then use your new parameter in each printer profile so each Creality printer won't be stuck to anemic volumetric flows... This will provide cleaner and more straightforward use of Orca (most users use the Creality Generic PLA profile and don't change volumetric flow).

The default value for the new parameter is “0”, which disables the limit - nothing should need changing in the default profiles, they’ll behave similarly to today. This is a new “advanced” option which can be enabled at a users discretion.

@bistory
Copy link
Contributor

bistory commented Feb 6, 2024

Don't worry, I get it, I just pointed the fact that I worked on Creality profiles for Orca, but they are kind of messed up because the maximum volumetric flow of PLA profile is 8mm/s3.
The problem is the K1 is able to push it to 18mm/s3, but is throttled because of that. We had to create a new "HF" profile for PLA which changes the max volumetric flow of PLA. Which is crappy.
But if this PR is merged, it will be possible to set the correct values without messing with profiles like we had to.
And it will be 100% transparent to the end user.

But as you are using the lowest of both values, I'm not able to just set max_volumetric_flow_rate in K1.
It's not the best solution but we can live with (the best solution would be to drop old profiles and start over by overloading basic filament profiles for each printers).

@SoftFever
Copy link
Owner

Allow defining a max volumentric flow rate in the printer settings. This accounts for the fact that max volumentric flow is mostly defined by physical printer features (nozzle type, hotend and extruder choice) as well as filament properties (material, nozzle temp). The filament properties today already allow limiting the flow rate but this is cumbersome if you own multiple printers that are limited by their extruder or hotend and not by material properties, resulting in requiring multiple filament profiles (with per printer limits) or multiple process settings (with different speeds).

With the per printer setting the max speed will be limited to the lower number derived from printer and filament settings. A printer setting of 40mm3/s and a filament setting of 11mm3/s will limit to 11mm3/s while a filament setting of 40mm3/s and a printer setting of 15mm3/s will limit to 15mm3/s.

Settin the printer limit to 0 (the default value) will disable limiting based on printer setting.

The current workflow is that we define filament profile per machine.
e.g.
Generic ABS @MyPrinter-NF
Generic ABS @MyPrinter-HF

This should solve the problem you mentioned.

The problem with setting a maximum flow rate per printer is that it's heavily influenced by factors like the type of filament and the temperature used. For example, if you set it at 20 mm^3/s for a particular machine, it might only work well with specific settings, like using a certain brand of ABS filament at 300°C. This rate wouldn't be suitable for other materials like PETG or PLA, let alone TPU. So, in the end, we'll still need to create specific filament profiles for each machine.

Hence, I think defining a max volumetric speed for the printer is not necessary.

@mjonuschat
Copy link
Contributor Author

While I understand your workflow it certainly doesn't scale well if you have a multitude of printers that all have different maximum flow rates due to hotend / extruder choices but are otherwise able to print the same filament with identical settings.

I currently have 37 different filament profiles, in general one per Brand + Material combination, and 5 printers. I could see the proposed workflow scale with something like filament templates and inheritance + binding filaments to a printer. With the current way this work if I need to define one filament per printer to account for their maximum volumetric flow I end up with 185 different filament profiles. If I want to change something that is the same across all filament profiles I need to do this 5 times.

The maximum flow rate per printer would help here because it's the smallest common denominator. If the filament (because of it's material science) can't flow higher than say 11 mm3/s then that's the limiting factor across all printers that can print that fast or faster. If one printer can't print at that flow rate it would instead limit it based on it's printer properties, not on the filament properties.

For the - in my experience - rarer case that you have one printer that you use to print at extremely high temperatures/speeds/etc that diverge from the baseline setup creating a different filament profile would still be an option.

And while it's not a great argument I'd like to point out that this is functionality which pretty much every other slicer has (Prusa/SuperSlicer has it in the Print Settings due to the use in the Auto-Speed functionality but it's inherently the same approach).

@bythorsthunder
Copy link

I certainly agree that filament type is a contributing factor to flow rates but I believe the physical characteristics of the printer play a much greater role. As mjonuschat mentioned the hotend type, nozzle type and extruder are the primary factors in determining flow even across different filament types. Every time a new filament is added to my inventory I now have to create 4 different filament profiles and any time I want to change a filament setting that change needs to happen in 4 different places. Soon to be 5.

By adding a max flow rate to the printer settings we can eliminate the number of filament profiles by a factor of the number of printers we are running. For those with one or two I certainly understand that this feature is probably not necessary but with more there seems to be great value with little downside.

I do hope that this feature can be implemented.

@SoftFever
Copy link
Owner

The maximum flow rate per printer would help here because it's the smallest common denominator. If the filament (because of it's material science) can't flow higher than say 11 mm3/s then that's the limiting factor across all printers that can print that fast or faster. If one printer can't print at that flow rate it would instead limit it based on it's printer properties, not on the filament properties.

Hmm, there is an issue here: assuming the machine's flow rate is 11 mm^3/s doesn't hold true for all filaments. In real-world cases, it's likely to be as follows: 11 mm^3/s for PLA, 13 mm^3/s for ABS, 7 mm^3/s for PETG, and 3 mm^3/s for TPU.
Let's say you have another HF(high flow) machine, how does the proposed changes saving you from creating new filament profiles for you?
Therefore, setting 11 in the printer settings doesn't solve the problem.

I don't have many material profiles, but I sort of understand the pain point you're mentioning. Maybe in the future, we can allow users to define conditional max flow rates for the filament.

@bistory
Copy link
Contributor

bistory commented Feb 10, 2024

The maximum flow rate per printer would help here because it's the smallest common denominator. If the filament (because of it's material science) can't flow higher than say 11 mm3/s then that's the limiting factor across all printers that can print that fast or faster. If one printer can't print at that flow rate it would instead limit it based on it's printer properties, not on the filament properties.

Hmm, there is an issue here: assuming the machine's flow rate is 11 mm^3/s doesn't hold true for all filaments. In real-world cases, it's likely to be as follows: 11 mm^3/s for PLA, 13 mm^3/s for ABS, 7 mm^3/s for PETG, and 3 mm^3/s for TPU. Let's say you have another HF(high flow) machine, how does the proposed changes saving you from creating new filament profiles for you? Therefore, setting 11 in the printer settings doesn't solve the problem.

I don't have many material profiles, but I sort of understand the pain point you're mentioning. Maybe in the future, we can allow users to define conditional max flow rates for the filament.

Won't it be easier to have a way to overload filament generic profiles without breaking users presets ?

@mjonuschat
Copy link
Contributor Author

Hmm, there is an issue here: assuming the machine's flow rate is 11 mm^3/s doesn't hold true for all filaments. In real-world cases, it's likely to be as follows: 11 mm^3/s for PLA, 13 mm^3/s for ABS, 7 mm^3/s for PETG, and 3 mm^3/s for TPU.
Let's say you have another HF(high flow) machine, how does the proposed changes saving you from creating new filament profiles for you?

Thank you for that example, I think I'm not explaining the issue I'm trying to solve well enough. As I see it we are approaching the same problem from different angles. You are focusing on the "melting" capabilities of the material and I am focusing on the capabilities of the printers. Each by itself is not able to "fully" solve the problem for diverse use cases.

As you have pointed out my patch of adding an upper bound on the flow rate in the printer settings alone doesn't help me avoid different profiles for different filaments and/or materials. I will need a profile for ABS, one for PLA, one for PETG and one for TPU because all these behave differently, need different temperatures and cooling.

The filament settings are great when it is the filament that is limiting the maximum. Even using some Ultra High Flow hotend, I will be hard pressed to print TPU faster than a few mm3/s, far below the capabilities of that hotend.

Where my patch comes in is if you have filaments - I will use ABS in this example - that can actually exceed the limits of your hotend(s). For the sake of the argument lets put take 70mm3/s as the maximum flow rate that ABS is printable at. Not unheard of but certainly quite high. Lets also assume I have three printers. One with a Standard Flow (SF) hotend, capable of 11mm3/s. One with a High Flow (HF) hotend, capable of 24mm3/s, and then one with a Ultra High Flow Hotend (UHF) capable of 44mm3/s.
All of them can max out their respective flow rates with ABS, but none of them would like trying to print with 70mm3/s flow.

Today I have two option to manage this:

  1. The workflow you've proposed. Create three filament profiles, ABS@SF, ABS@HF and ABS@UHF - workable but with a large library of ABS filaments that differ other print properties you end up creating a lot of redundancy
  2. I could create multiple process settings (SF, HF, UHF), manually calculating the speeds based on line width and layer height to not exceed the max flow rate of the printer. This gets really unwieldy with features like Arachne or variable layer height not keeping these constant.

I am proposing to add a third option - limit it based on the hotend (printer) capabilities. Getting back to the example above one could set an additional max flow rate in the printer. They would ONLY apply if the combination of filament flow rate (limits) + process settings results in a flow that exceeds the printer capability.
With this patch I could use the same FIlament profile (with a high limit on flow representing the maximum achievable for the filament) and the same process settings across the three different printers, each one of them limiting top end printing speeds to their respective abilities.

While writing this it oocurs to me that this is actually the same process/logic that is already used for the motion abilities of the printer. There we define maximum allowable speed and jerk values at the printer level and then apply those to the process settings for the speeds and accelerations. One could make the argument that I don't need those on the printer either :)

Anyways, sorry for the wall of text, thanks for reading it and I hope I've managed to explain the reason for why I still think the limit would be valuable to have in addition to the filament settings. If this is still a hard no from your end feel free to close this PR - no need to keep it lingering until the bot comes around and closes it as stale.

@SoftFever
Copy link
Owner

The maximum flow rate per printer would help here because it's the smallest common denominator. If the filament (because of it's material science) can't flow higher than say 11 mm3/s then that's the limiting factor across all printers that can print that fast or faster. If one printer can't print at that flow rate it would instead limit it based on it's printer properties, not on the filament properties.

Hmm, there is an issue here: assuming the machine's flow rate is 11 mm^3/s doesn't hold true for all filaments. In real-world cases, it's likely to be as follows: 11 mm^3/s for PLA, 13 mm^3/s for ABS, 7 mm^3/s for PETG, and 3 mm^3/s for TPU. Let's say you have another HF(high flow) machine, how does the proposed changes saving you from creating new filament profiles for you? Therefore, setting 11 in the printer settings doesn't solve the problem.
I don't have many material profiles, but I sort of understand the pain point you're mentioning. Maybe in the future, we can allow users to define conditional max flow rates for the filament.

Won't it be easier to have a way to overload filament generic profiles without breaking users presets ?

We will still end up creating multiple filament profiles with inheriting I think.

@SoftFever
Copy link
Owner

Hmm, there is an issue here: assuming the machine's flow rate is 11 mm^3/s doesn't hold true for all filaments. In real-world cases, it's likely to be as follows: 11 mm^3/s for PLA, 13 mm^3/s for ABS, 7 mm^3/s for PETG, and 3 mm^3/s for TPU.
Let's say you have another HF(high flow) machine, how does the proposed changes saving you from creating new filament profiles for you?

Thank you for that example, I think I'm not explaining the issue I'm trying to solve well enough. As I see it we are approaching the same problem from different angles. You are focusing on the "melting" capabilities of the material and I am focusing on the capabilities of the printers. Each by itself is not able to "fully" solve the problem for diverse use cases.

As you have pointed out my patch of adding an upper bound on the flow rate in the printer settings alone doesn't help me avoid different profiles for different filaments and/or materials. I will need a profile for ABS, one for PLA, one for PETG and one for TPU because all these behave differently, need different temperatures and cooling.

The filament settings are great when it is the filament that is limiting the maximum. Even using some Ultra High Flow hotend, I will be hard pressed to print TPU faster than a few mm3/s, far below the capabilities of that hotend.

Where my patch comes in is if you have filaments - I will use ABS in this example - that can actually exceed the limits of your hotend(s). For the sake of the argument lets put take 70mm3/s as the maximum flow rate that ABS is printable at. Not unheard of but certainly quite high. Lets also assume I have three printers. One with a Standard Flow (SF) hotend, capable of 11mm3/s. One with a High Flow (HF) hotend, capable of 24mm3/s, and then one with a Ultra High Flow Hotend (UHF) capable of 44mm3/s. All of them can max out their respective flow rates with ABS, but none of them would like trying to print with 70mm3/s flow.

Today I have two option to manage this:

  1. The workflow you've proposed. Create three filament profiles, ABS@SF, ABS@HF and ABS@UHF - workable but with a large library of ABS filaments that differ other print properties you end up creating a lot of redundancy
  2. I could create multiple process settings (SF, HF, UHF), manually calculating the speeds based on line width and layer height to not exceed the max flow rate of the printer. This gets really unwieldy with features like Arachne or variable layer height not keeping these constant.

I am proposing to add a third option - limit it based on the hotend (printer) capabilities. Getting back to the example above one could set an additional max flow rate in the printer. They would ONLY apply if the combination of filament flow rate (limits) + process settings results in a flow that exceeds the printer capability. With this patch I could use the same FIlament profile (with a high limit on flow representing the maximum achievable for the filament) and the same process settings across the three different printers, each one of them limiting top end printing speeds to their respective abilities.

While writing this it oocurs to me that this is actually the same process/logic that is already used for the motion abilities of the printer. There we define maximum allowable speed and jerk values at the printer level and then apply those to the process settings for the speeds and accelerations. One could make the argument that I don't need those on the printer either :)

Unfortunately, the max flow rate is very different from the mechanical limitation. What I'm trying to point out in my previous post is that there is no machine's melt capability without specifying what material and "at what temperature." While the proposed change may be useful for people who only use one type of filament, it's not generic, and the solution is too specific for a very specific use case, which I try to avoid because it will cause confusion for users who don't use this workflow. More importantly, it will cause trouble for future updates if we want to implement a new solution for such a problem.

Anyways, sorry for the wall of text, thanks for reading it and I hope I've managed to explain the reason for why I still think the limit would be valuable to have in addition to the filament settings. If this is still a hard no from your end feel free to close this PR - no need to keep it lingering until the bot comes around and closes it as stale.

Not at all, thanks for sparking the discussion and providing perspectives!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants