A popular question among SOLIDWORKS users is “How do I determine volume marking levels in containers?” Perhaps you have run into a similar scenario in the past. This is easy if the container has a regular shape (like a cylinder or pyramid), but it becomes a bit more challenging when the container has an irregular shape.
When the containers are irregular, the calculations become difficult at best. You must either make approximations with SOLIDWORKS or build a prototype to run physical tests. This is both time-consuming and inaccurate. In this blog, we will show you a method that utilizes Design Studies, with a little assistance from Excel, to get results efficiently and accurately!
Container Section View
Start with a hollow container of any shape. The shape can be regular or irregular, as seen in the section view to the right. Create a section view, this will make visualizing the following steps easier.
Extrude a box that fully envelopes the container. Be sure that you un-check the “merge” result option on the extrude feature. We need two bodies for this technique to work.
Splitting Plane (AKA Fluid Level)
Next, create an offset plane that cuts both bodies. This offset plane will be used to determine the level in the container that corresponds to a given fluid volume.
Create Intersection Regions
Now, we will use the intersect command to split the two bodies into 6 unique sections (2 box bodies, 2 container bodies and two bodies internal to the container representing the “fluid”). The number of resulting sections vary depending on the geometry and intersection plane. Select two solid bodies and the offset plane you created. The plane will split the two solid bodies.
The container will be split into three bodies with one representing the fluid up to the level of the section plane. Now, create a sensor that measures the volume of the internal or fluid body. You will reference this a few times in the next steps.
For my container, I want to find the water levels that correspond to 50, 100, 150… 350 cm^3. Since we don’t know the levels (or the section plane height) that corresponds to these volumes, we will determine the volume for a few known fluid levels first, then use that information to calculate the section plane height that corresponds to our desired fluid volume markings.
Modify the section plane to a height of 10mm (this will be different for your model) and record the corresponding fluid volume. Now, modify the section plane to a 20mm offset. Because my container is 100mm tall, I will create ten steps in increments of 10mm and record the fluid volume at 20, 30, 40… 100mm.
This can be a bit time consuming depending on the number of data points you want to collect. But lucky for you, there is a better way, keep reading!
Design Studies For More Than Just Simulation
We can use the design study to automate the process of geometry modification and report any number of unique results from stresses to weight or in our case, fluid volume.
In setting up the design study, the dimension used for the splitting plane will be our only variable. We set the variation type to “Range with Step” and defined a min/max value along with our step size. In this example, our minimum is 10mm, maximum is 95mm and the step size is five. This results in 18 total scenarios.
Next, we define a volume constraint to track the volume of the fluid body we previously defined. By selecting the “Monitor Only” option, the software simply reports the resulting volume of the fluid corresponding to each scenario.
Finally, click “Run” to execute the design study. The study completes in only a few seconds! This is a significant time saver when compared to the manual method previously described. Additionally, these results can be saved to a CSV, which can be used in the final step.
Interpolate in Excel
Now, create a graph in Excel using the section heights and the calculated fluid volume from SOLIDWORKS. Plot the volume on the x-axis and the height on the y-axis. The graph is not necessary, but it helps ensure you have enough data points.
Next, use the “Forecast” command in Excel and the two columns of data you previously generated to determine the height that corresponds to your desired volume levels. The Forecast command is a method of linear interpolation. This means, the accuracy of your interpolated values will depend on the number of data points. The results are in red in the chart below:
*Note: Because we are using interpolated values the results will not be exact but if you used enough data points, the deviation should be very small.
Want to expand on your knowledge of SOLIDWORKS Simulation? Sign up for a training class!