Thermal Systems library - How to access gas under 200 K? - modelica

Im trying to develop a model of a tuna freezer that operates a low temperatures down to -90 degree Celsius. The process is LNG ca -140 degree Celsius -> air cycle ca. -120 degree Celsius -> dry air freezing chamber -90 degree Celsius.
The problem Im facing is that the minimum temperature for the dry air gas in Dymola seems to be 200 K(-73.15 degree Celsius). But also the values of the VLE Fluid seems a bit strange. Do anyone have an idea how to get a fluid with lower Kelvin.
Kind regards,
Sondre

I see that you are using the library TIL (or ThermalSystems).
I don't know the limit of the basic dryAir. But there is one valid between 13.3 - 3000K :
TSMediaXTR.DRYAIR
Temperature range: 13.3 - 3000 Kelvin. (Thermophysical properties may differ to models with smaller range.)
You can use it via a record (Replace TS by TILMedia if you have the TIL library):
record TSMedia_DryAir2
extends TSMedia.GasTypes.BaseGas(
final fixedMixingRatio=false,
final nc_propertyCalculation=1,
final gasNames={"TSMediaXTR.DRYAIR"},
final mixingRatio_propertyCalculation={1},
final condensingIndex=0);
end TSMedia_DryAir2;
Regarding VLE value, what is the vle you selected ?

Related

Convert Iphone accelerometer dataset from G unit to bytes to be used with Arduino 101

I'm trying to convert the accelerometer values provided by the following dataset to train the intel curie KNN chip of an Arduino 101 to recognize walking and running actions:
https://github.com/mmalekzadeh/motion-sense
This dataset is collected by using an Iphone 6s accelerometer. Since I want the arduino to be able to recognize walking and running by using its own accelerometer (not the iphone one), I need to convert the dataset to the same data rapresentation used by arduino 101 (bytes). How this can be done?
This is what I did:
1) Found Iphone 6s accelerometer datasheet. The Iphone 6s (just like the Iphone 6) has two different chips, but probably this is the one used in the dataset.
2) Found Curie chip acceletometer datasheet. Available here
3) Iphone data is expressed in both gravity and userAcceleration per axis, while Curie chip only return a 4 bytes values per axis. Here is written that Iphone total acceleration is the sum of gravity and userAcceleration...but which is the unit used to represent this value? I think G units...but I'm not sure...
Update: The dataset is expressed in G units with sensitivity range of ±8g. To convert data from Gs, the formula below posted by L. Putvin can be used.
If you want to recognize walking and running you will need to use the 8g or 16g range if you want to be safe (the max needed will also depend on where the sensor is worn, as the accelerations are greater for certain parts of the body than others). You must decide which one first, and then you will multiply the G rating from the phone by the LSB number.
Sensitivity (calibrated)
— (A): ±2g: 16384 LSB/g
— ±4g: 8192 LSB/g
— ±8g: 4096 LSB/g
— ±16g: 2048 LSB/g
When you setup the arduino you will need to change the sensitivity from the default value when you switch to the internal sensor.

Dymola / Modelica - District heating

I am trying to validate a district heating model I built using Dymola.
In this case, I am trying to find the mass flow during a year period. I have two models running. both with the same loads and pipes with same characteristics as this picture:
pipes
Both models are as follows:
models
My results are making sense at least regarding the time of the year my flow should be higher, I am getting very high values during January, February and March, then again by the end of the year.
However those high peaks are VERY different, the first model on the picture is giving me peaks of almost 400kg/s whereas the second one is reaching up to 70kg/s.
Can anyone suggest a way to validate the model? I have the heat loads for the year hour by hour (this is the input I am giving to Dymola), I know that the min temperature of the water is 70 and the max is 85 celsius.
But I am really struggling to validate my model. Any suggestions?

Matlab: How to fit a state space model to data with nlinfit

I've run an experiment and would like to fit a state space model to the data. Unfortunately I have little experience with how to implement this, so was hoping to ask for some help.
In the experiment participants reach towards different targets. The participant receives feedback about their movement via an on screen cursor. This cursor displays their reaching movement, but is rotated by 30 degrees. This means participants initially make large errors, but reduce them with repeated practice.
The following data provides some illustrative results. Each value represents an 'epoch' (average of eight trials):
18.26
13.95
10.92
10.32
8.23
6.57
7.05
5.98
5.99
4.58
4.35
3.72
3.71
3.04
4.47
4.16
I have found a paper that has used a similar experiment and has fit a state space model to their data. The model is composed of two equations:
1) e(n) = p(n) - s(n) + E(n) 2) s(N+1) = s(n) + Ae(n)
Where e(n) = error on trial n (i.e. values above)
p(n) = perturbation applied to movement (i.e. 30 degrees)
s(n) = internal state of system
E(n) = noise
A = rate of adaptation to perturbation
The paper indicates that they used the nlinfit matlab function to implement this model, but I don't understand how I would do this. Any help would be greatly appreciated!
I've just seen your post now, ages later, but I've come accross it while looking for a problem of my own.
From experience, I know that if you have a system that you want to obtain a State Space model for, and you have measured inputs and corresponding measured outputs from your system, you can use the 'pem' function that will build you a state space model based on your measurements.
The 'pem' function is part of the system identification toolbox.

What units does iOS GPS return speeds in?

I'm using the iPhone 4's built in GPS to return the date pos alt and speed.
However after looking for a long time I cant seem find what the speed is returned as, I know it's a double, but is this in meters per hour, feet, miles or what?
can anyone out there shed a clue???
thanks in advance.
Spriggsy.
Meters / second are the units of the speed
If you read the documentation, you'll find that the very first thing it tells you is what units it's in (metres per second).
If you read the EXIF tags standards doc, the allowable choices are K, M, or N for KpH, MpH, or Knots. The value Apple sticks in the GPSSpeed Field is however m/s while using K for the GPSSpeedRef (which violates the EXIF Standards)

How do I measure sound pressure using the iPhone internal microphone?

I want to measure the loudness of ambient sound. Having read a number of posts on stackoverflow I feel more confused than I was originally. Im not a sound engineer just a programmer.
I think I need to calculate dBSPL with the formula 20 * log10 (voltage / Voltage_Ref)
So for this I need to sample the internal microphone voltage (or pressure in Pascals?) level. The class AVAudioRecorder allows me to meter read the peakPowerForChannel but this gives a dbFS reading between 160 and 0. Where 0 is full power. How do I access the voltage/pressure levels, with another API perhaps?
I had read that roughly 0 dbFS = 99 db SPL. But that would mean the maximum db SPL I could read using the peakPowerForChannel reading would be 99 db SPL. I'm looking to read levels higher than this.
Any information on this would be most appreciated - im somewhat stuck at this point.
Thanks
Mike
The only way to do this is to test your particular iOS device model (and perhaps production batch) against a known sound source at a given distance and relationship to the mic in an anechoic chamber. The voltage and pressure relationship is neither specified by Apple nor available from any API.