-
Notifications
You must be signed in to change notification settings - Fork 2
Getting started with NeqSim in Matlab
The following steps describes how to set up NeqSim Matlab fo first use:
1. Update the pathstring variable in pathNeqSim.m file
The pathNeqSim.m file needs to be set up with the correct path to the installation. The pathstring variable has to be set to the base directory where neqsimmatlab is on the local disk.
pathstring = 'C:\.......\neqsimmatlab\';
2. Set up the database connection Changing the database is only necessary if an external database will be used. By default neqsimmatlab uses the embedded parameter database (Derby database). If an external database will be used, the connection string to the database need to be modified in pathNeqSim.m:
neqsim.util.database.NeqSimDataBase.setDataBaseType("Derby");
neqsim.util.database.NeqSimDataBase.setConnectionString("jdbc:derby:classpath:......");
-
Run the pathNeqSim.m script in Matlab
-
Enter the following script to check that neqsimmatlab works correctly:
fluid1 = thermo('srk');
fluid1 .addComponent('methane', 10.0);
fluid1 .addComponent('propane', 1.0);
fluid1 .addComponent('n-hexane', 1.0);
fluid1 .addComponent('water', 1.0);
fluid1 .createDatabase(1);
fluid1 .setMixingRule(2);
fluid1 .setMultiPhaseCheck(1);
TPflash(fluid1,0);
fluid1