Volume / graduation water carafe

Hi all

Thank you for reading :)

Let's take the example of a 2L carafe of water with a complex envelope.

I would like to graduate it every 1mL. To do this, I need to evaluate the volume and then measure the height from the bottom.

The decanter is high and the number of graduations is consequent. I would like to be able to automate and have the result in the form of a table: Volume mL | Height mm  (or Height in mm = f( Volume mL) )

I manage to do it but... in the opposite direction. !
I sketch a rectangle encompassing 3/4 of my volume with a dimension starting from the bottom of the decanter and then, removed. of matter through both;
Then in the design study, I choose this dimension as variable, interval with pitch, Min: carafe bottom, Max: carafe top, Pitch: 5mm.
Limits imposed: volume of liquid "to be monitored"
Execute

**magic**
All the scenarios are played,
The painting appears, and at each height for a 5mm step I get the volume. Copy/paste in Excel is enough for me.

In the other direction I don't know how to do it. We should define the volume of the body as a variable and here I get stuck. :/

If someone can give me a thumbs up,
Thank you.

Kind regards
PA

 

NB: for those who don't know, to get to this point these tutorials have been useful to me:
https://www.solidsolutions.co.uk/blog/2014/05/calculate-internal-fluid-volume-using-the-SOLIDWORKS-intersect-tool/
https://www.youtube.com/watch?v=jmQLRwoS-gs
https://www.youtube.com/watch?v=3MUMyT7DT-8

2 Likes

I don't think SW can do this research:
The calculation you are currently doing is "simple" for SW, it has a dimension to vary with a known increment, from there the model varies and it gets a result.
In your request, it would be necessary that for each volume value it calculates the height dimension per iteration.

This may be feasible with a macro that could optimize computation time by taking the previous value as the starting point for the next tick mark.
As a result, you could even do your graduation right away.

3 Likes

Hello
I propose a way towards an approximate solution: entrust Excel with the task of expressing the height H of the graduation as a function of the volume, thus inverting the function provided by the SolidWorks design study...

Starting point:
- a 2.5-litre carafe model, with a fairly regular profile,
- the Excel file from the design study on the principle you describe. It allows you to know the volume V of the fluid as a function of its height H (varying from 2 to 2 mm in my example)

Procedure in Excel:
- draw the curve representing the position H of the ticks on the y-axis, as a function of the volume V on the x-axis;
- request the display of a polynomial-type trend line, of degree to be fixed to best follow the previous curve. Check the box to display the trendline equation;
- recover this equation by copying and pasting, and use it to calculate the position H' of the graduations corresponding to "round" values V' of the volume (from 50 to 50 cm3 on my example);
- retrieve the values of this column H' to draw the tick marks in SolidWorks, via a macro (taken and adapted from an old Lynkoa thread...).

Weaknesses of the method:
This result depends on the accuracy of the SolidWorks calculation, and especially on the "quality" of the Excel trend line in terms of tracking the initial curve. A polynomial of degree 4 or 5 is sufficient if the profile of the decanter is regular. If he is very tortured, it may be necessary to consider a piecemeal treatment.

Kind regards
M. BLT


vcarafe.zip
2 Likes

Amazing to have had such a clean answer so quickly, a big thank you to both of you.

Mr. Blt's solution is well suited; I have an older version of SolidWorks so I can't open the assembly but I understand the essentials and it works very well.

As for the macro, I've never done one yet, so I'll learn with a little more time.

Kind regards

Pa

 

 

1 Like