Message Boards Message Boards

0
|
4300 Views
|
8 Replies
|
6 Total Likes
View groups...
Share
Share this post:
GROUPS:

System Modeler Free Body Diagram Solving Capability

I am wondering if System Modeler can be used to solve free body diagram problems. This would be very powerful for statics classes. I have looked for a free body diagram diagram creator and I have yet to find a software that will solve for force and torque. I am also wondering how to create a mass of water of 1 kg with a specific temperature of 90Celsius in System Modeler.

POSTED BY: Peter Burbery
8 Replies

Is there a way to cache or prefetch heat capacity data for an offline session of Wolfram System Modeler and Wolfram Mathematica? I am having trouble solving this homework question in Wolfram System Modeler:

I have tried the piston class but this is too complicated and so I don't think it matters what component I use, just the thermodynamic properties of the starting and ending states. Is there a way to model an entity of 1 kg of water with a starting temperature of 90Celsius and a final temperature of 250 Celsius? I am looking for a place to start with this thermodynamics question but don't know if I should take a components approach or analytical solving approach or if I should combine these approaches with graphing the system's quantities and integrating to find the work in the Modeling Center.

enter image description here @Ankit Naik @Sergio Vargas

POSTED BY: Peter Burbery

Is there a way to cache or prefetch heat capacity data for an offline session of Wolfram System Modeler and Wolfram Mathematica?

ThermodynamicData may be what you are looking for, it produces data for all the substances in the list ThermodynamicData[]. For example, you can gather isochoric and isobaric specific heat capacities in a list of associations with

substances = ThermodynamicData[];
data = Function[substance, 
    Association[
     Prepend[Map[
       Function[property, 
        property -> 
         ThermodynamicData[substance, 
          property]], {"IsobaricHeatCapacity", 
        "IsochoricHeatCapacity"}], "Substance" -> substance]]] /@ 
   substances;
cleanData = Select[data, FreeQ[#, Missing] &];

Gathering this data will take a while. Afterwards, you can explore this data in a dataset with Dataset[cleanData]. Then you can either choose to move your project fully to System Modeler or maintain a mixed WL & System Modeler approach. But given the scope of your project I suspect using this data is not the main issue or possibly the ideal approach, so I won't go into too much detail about it (for instance, you can always pass parameter values to functions such as SystemModelSimulate, SystemModelPlot, CreateSystemModel and ConnectSystemModelComponents, as shown in their documentation pages, or you can also directly pass numeric data to CreateDataSystemModel). Unfortunately, your exercise explicitly has mixed phases (water and vapor) and phase transitions, which means you can't handle heat capacity as a parameter that does not change in time. Hence, I think in this case you may need to resort to more advanced libraries such as Modelica.Media as @Ankit Naik suggested. This library already contains a ton of media data, which would mean you would not need the WL to gather it. He may be able to give you more details.

POSTED BY: Sergio Vargas

Using Wolfram Alpha online you can find the isochoric molar heat capacity of carbon dioxide with

https://www.wolframalpha.com/input?i=isochoric+heat+capacity+of+carbon+dioxide

If you have Mathematica installed with a matching version to your System Modeler, you can make a copy of the electric kettle model and change in it the parameter value associated to the heat capacity with

SystemModel["IndustryExamples.ConsumerProducts.ElectricKettle.
ElectricKettleControl", <|"ModelName" -> "KettleWithCO2", 
  "ParameterValues" -> {"Water.C" -> heatCapacityCO2}|>]

Here we can estimate heatCapacityCO2 with the help of Wolfram Alpha, which in Mathematica can be called with WoframAlpha. The kettle becomes a bit unrealistic when using carbon dioxide but let's say that we just take the volume of water and replace it with CO2. Since the model uses 1.7 Kg of water, we would have then

massH20 = Quantity[1.7, "Kilograms"];
densityCO2 = 
  WolframAlpha[
   "density of carbon dioxide", {{"Result", 1}, "QuantityData"}];
densityH2O = 
  WolframAlpha["density of water", {{"Result", 1}, "QuantityData"}];
massCO2 = massH20*densityCO2/densityH2O;

Now let's get an estimate of the specific heat capacity of the carbon dioxide at constant volume. For simplicity, let's assume our kettle has gas-proof sealing and tolerates the pressures of heated CO2. In practice, the specific heat will change with the temperature, so this model can be made more accurate by swapping this parameter with a time-changing value. But for now, let's just use the isochoric molar heat capacity from Wolfram Alpha and the molar mass:

isochoricMolarHeatCO2 = 
 WolframAlpha[
  "isochoric heat capacity of carbon dioxide", {{"Result", 1}, 
   "QuantityData"}];
molarMassCO2 = 
 WolframAlpha[
  "molar mass of carbon dioxide", {{"Result", 1}, "QuantityData"}];
specificHeatCapacityCO2 = isochoricMolarHeatCO2/molarMassCO2;
heatCapacityCO2 = QuantityMagnitude[massCO2 specificHeatCapacityCO2]

This finally gives us heatCapacityCO2 = 2.04892. This is the value that we can then use in the SystemModel call. Alternatively, you can just plug this value in the Water.C parameter in System Modeler.

POSTED BY: Sergio Vargas

You can probably use Wolfram|Alpha or browse the web to get the property of a substance. Using the Media library can provide you with some information, but it is a bit advanced.

POSTED BY: Ankit Naik

I am wondering what to do if I don't know the property of a substance I would like to model, for example what I am modeling carbon dioxide and I don't remember what the specific heat of carbon dioxide is. Is there a way to get this information in Wolfram System Modeler? I fixed the parameters problem. There was a viewing setting I had to change to see the parameters below the model when I clicked on a component.

POSTED BY: Peter Burbery

In the model of the electric kettle, if you select the Water component, you will find the heat capacity parameter C in the General tab.

For water, you can use 4182(heat capacity) x mass of water.

POSTED BY: Ankit Naik

The parameters for heat capacity in J/kg are not displaying for the example Electric Kettle model copmonents.

POSTED BY: Peter Burbery

Modeling water:

If you want to model heat loss to the ambient. You can use a Heat Capacitor component. You can check the electric kettle example for reference.

Free body diagram:

You can calculate forces and torques for 1D translation and rotational systems, using the built-in libraries, for instance Oscillator and Coupled Clutches. You can also use the free PlanarMechanics library to model 2D systems.

POSTED BY: Ankit Naik
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract