Comments (3)
I don't know why it's complaining about ExternalMediaLib.dll, since I'm using libExternalMediaLib.a
Static libraries .a
can only be used when it's been linked into the model. If a value is needed during compile-time, a dynamic library .dll
is required.
from externalmedia.
Hi again,
I found a workaround for the error: I filled the externalFluidConstants record by hand (so the code does not call woPhaseMedium_getCriticalPressure_C_impl and TwoPhaseMedium_getMolarMass_C_impl C functions, which apparently OM cannot find).
The media definition is now:
package NH3CoolProp "CoolProp model of NH3"
extends ExternalMedia.Media.CoolPropMedium(
mediumName = "Ammonia",
substanceNames = {"NH3"},
inputChoice=ExternalMedia.Common.InputChoice.pT,
externalFluidConstants=FluidConstants(
iupacName="Ammonia",
casRegistryNumber="7664-41-7",
chemicalFormula="H_{3}N_{1}",
structureFormula="unknown",
molarMass=0.01703026,
criticalTemperature=4.054e+02,
criticalPressure=11333000,
criticalMolarVolume=7.569004444444444e-05,
acentricFactor=0.253,
triplePointTemperature=1.95495e+02,
triplePointPressure=6.091223108131509e+03,
meltingPoint=195.4200,
normalBoilingPoint=2.398235545665792e+02,
dipoleMoment=1.42));
end NH3CoolProp;
NOTE: I removed the line:
ThermoStates = Modelica.Media.Interfaces.Choices.IndependentVariables.pT
since I couldn't see its use (Could someone confirm this???. Instead, I added the the following line:
inputChoice=ExternalMedia.Common.InputChoice.pT
which actually changed the state selection. I know this beacuse, if I changed to
inputChoice=ExternalMedia.Common.InputChoice.ph
then, the initialization process needed to solve a non-linear system of equations.
from externalmedia.
@ferrucci-franco your Test1 model compiles correctly with the new 3.3.2 version. It then fails at runtime with
ExternalMedia error: unable to solve 1phase PY flash with Tmin=195.494, Tmax=239.585 due to error: HSU_P_flash_singlephase_Brent could not find a solution because Hmolar [0 J/mol] is below the minimum value of 1.94632523329 J/mol
but I guess that's another story.
We'll release 3.3.2 anytime soon, in the meantime you can get it from the latest binaries here.
from externalmedia.
Related Issues (20)
- Incompressible package runs in OpenModelica but not Dymola
- Model fails to execute when using two different fluids
- Model fails to run when using Modelica.Fluid.Sensors.Temperature
- Call ExternalMedia from OMPython HOT 1
- External function could not be found in any of the given shared libraries HOT 1
- External functions in ExternalMedia should be explicitly declared as pure
- Use CoolProp 6.4.4 as soon as it is released, instead of nightly build HOT 1
- support for older gcc versions HOT 4
- Compilation errors in OpenModelica HOT 7
- Selection of different state variables (ph, pt, dT) for a CoolProp 2-phase medium HOT 1
- Cannot compute arbitrary partial derivatives with function `partialDeriv_state` HOT 2
- Wrong version of cmake required to compile the library HOT 1
- Restructuring of the repository HOT 4
- build error using cmake on windows HOT 1
- State functions do not seem to work properly HOT 6
- Compressible mixture support? HOT 2
- Custom fluid property support
- Incompressible CoolProp tests do not compile HOT 3
- Remove experiment annotation from partial models
- how to use fliudprop in external Media?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from externalmedia.