Simulation of Liquid Level Vs. Volume

Liquid Level Sensors or Float Switches can be used to calculate the volume of liquid available in a bottle or container.
The float sensor will report back the height of the liquid, which can then be used to calculate the volume, assuming the dimensions of the bottle are know.

For simple, cylindrical bottles; the volume will increase directly with liquid level and this should be easy to calculate.However, for bottles with unusual geometry, the relationship between volume and liquid level may need more investigation.

The steps below show how SolidWorks can be used to calculate the relationship between volume and liquid level in a bottle with unusual geometry.
Liquid Sensing Graph 01

1. Model the Bottle geometry (using “Shell” method).
2. Use “Move-Copy Body” to create a copy of the body in the exact place of the original.
3. Create a new body that completely fills the internal space of the Bottle.
4. Use “Combine” with the “Subtract” feature to subtract one body from the other. The copied Bottle body will be absorbed.
5. Add an Extruded Cut for the liquid level.
6. Create a new Design Study.
7. Create a new Model Dimension Parameter and link it to the Extruded Cut.
(Open Parameters, select dimension on sketch, type in a name)
8. Add a “Sensor” for the Volume of the liquid body.
9. Set the Min, Max and Step values.
10. Run the Design Study.
11. Export the results to Excel. Create a lined XY Scatter graph.


Finished CAD model

Volume_Sensing_07 (step 02-move copy)

Step 2

Volume_Sensing_05 (step 03 create liquid)

Step 3

Volume_Sensing_06 (step 04 combine, subtract)

Step 4

Volume_Sensing_10 (step 05 Set up Parameters)

Step 7

Volume_Sensing_08 (step 06 Run Design Study)

Steps 8,9,10

Volume_Sensing_09 (step 07 export results)

Step 11

Mating fasteners with slots in SolidWorks

Aligning a fastener in a slot is a typical task in CAD modelling, and with SolidWorks there are number of different ways to do it. This post will look at some different methods that can be used for “mating” a fastener in a slot, trying to identify the method that is most stable and easy to edit. Click the images below to view them at full size.

The CAD model below shows four fasteners aligned in slots, using four different sets of mates:
Slot Mate 000

The middle-right fastener is constrained with two Symmetry mates, one acting in the X-Axis and one acting in the Y-Axis:
Slot Mate 005Slot Mate 002

The top-right fastener has a Concentric mate aligning the cylindrical surface of the fastener with the centre point of the slot feature sketch (below-left).
The middle-left fastener uses a horizontal Symmetry mate, like the fastener before, except this time it is used in combination with a vertical Width mate (below-right).
Slot Mate 001Slot Mate 003

The final lower-left fastener uses a coincident mate to align the Temporary axes of the fastener and the slot feature (below-left). This is the best method I have found so far, but it relies on the slots having a temporary X-Axis, which relies on the slot being created in the right way.
Slot Mate 006Slot Mate 004

The above-right image shows two slots – one that’s been created with a “Straight Slot” sketch feature and one that’s been created with a combination of line and arc sketch features. It can be seen that the “Straight Slot” feature has a Temporary Axis through its centre, whereas the slot created with line and arc features does not. I’d be interested to know if this is different in SolidWorks 2014.