orcmkit / ORCmKit

ORC Modeling Kit: Tools for the modeling of ORC power systems in Python, Matlab and EES
MIT License
23 stars 18 forks source link

Add experiment database file in orcmkit matlab version! #3

Open ChuZhenHao-ORC opened 8 years ago

ChuZhenHao-ORC commented 8 years ago

I don't know where to find these files, please help me and fix this bugs!

davideziviani commented 8 years ago

problem in these lines: path = 'C:\Users\RDickes\Google Drive\PhD\MOR study\ORC\Experimental database\Sun2Power'; EV_folder = [path '\Evaporator\']; load([EV_folder, 'ParametersCalibration_EV.mat']) CD_folder = [path '\Condenser\']; load([CD_folder, 'ParametersCalibration_CD.mat'])

@RDickes: do you plan to share these mat files or the users are supposed to implement their own?

RDickes commented 8 years ago

Hi,

Tonight I will push a new version without the need of these files!

ChuZhenHao-ORC commented 8 years ago

Hi, RDickes Is there any problems with your new verison matlab code?

davideziviani commented 8 years ago

@RDickes did you upload the new version to remove your path dependency?

MarcoM-ORC commented 8 years ago

Good evening RDickes and Davide,

I tried to use the matlab code ORCmKit but I had a problem:

Error in ==> OrcModel5 at 61 load([EV_folder, 'ParametersCalibration_EV.mat'])". Please could you help me to rectify this mistakes? In case could you upload the new version of the file?

Thank you in advance and best regard,

Marco M

RDickes commented 8 years ago

Hi Marco,

It seems I did not fixed all the problems, I'll check this tonight. You will have a working version of the codes by friday for sure. Sorry for that. Rémi

davideziviani commented 8 years ago

@RDickes : I think you can copy the .mat file inside this Matlab folder here in GitHub and change the directory so it would be easier for the users to do some debugging

MarcoM-ORC commented 8 years ago

Thank you so much RDickes,

Bye bye,

MarcoM

MarcoM-ORC commented 8 years ago

Good Morning guys,

I would like to ask to @RDickes if he have revised the directory in the MATLAB files of the ORC model? Have you added the .mat file in the folder? Sorry for my impatience ;) Thank you so much!!

Bye bye

Marco M

RDickes commented 8 years ago

Hi Marco, It is done, I have made a big push with many improvements on the codes and now you have access to my models as they are for the moment. I have added three .mat files (EXP_param_examples.mat / PP_param_examples / HEX_param_examples) so you can run the models with examples of modelling parameters. You will find many more submodels and different beta versions of my codes, but to make it simple:

Since I am still actively updating/improving these models, the different comments I made in the codes might not be all up-to-date. If you are lost or confused somewhere, just contact me and I will help you.

Hope you will like it, Best regards,

RDickes

MarcoM-ORC commented 8 years ago

Hi RDickes,

Thank you so much for your improvements on the codes. I have solved my problems with coolprop and I tryed the run of your codes:

HexModel Undefined function or variable 'zeroBrent'.

Error in HexModel (line 533) Q_dot_eff = zeroBrent ( lb, ub, 1e-8, 1e-8, f ); % Solver driving residuals of HEX_hConvVar_res to zero

In your opinion this is a problem of the code or am I doing something wrong? Thank you RDickes,

best regards,

MarcoM

RDickes commented 8 years ago

Hi Marco,

The zeroBrent function is in the 'auxiliary functions' folder, you just need to add the 'ORCmKit\Matlab\Auxilliary functions' folder in your Matlab path Best regards, Rémi

MarcoM-ORC commented 8 years ago

Ok, tank you so much Rémi. Best regards

Marco M

RDickes commented 8 years ago

Hi Marco,

The zeroBrent function is in the 'auxiliary functions' folder, you just need to add the 'ORCmKit\Matlab\Auxilliary functions' folder in your Matlab path Best regards, Rémi

Le 23/10/2016 à 09:18, MarcoM-ORC a écrit :

Hi RDickes,

Thank you so much for your improvements on the codes. I have solved my problems with coolprop and I tryed the run of your codes:

  • ExpanderModel.m---->ok
  • PumpModel.m----->ok -HexModel.m give me an error, I write you what is the problem:

    HexModel
    Undefined function or variable 'zeroBrent'.

Error in HexModel (line 533) Q_dot_eff = zeroBrent ( lb, ub, 1e-8, 1e-8, f ); % Solver driving residuals of HEX_hConvVar_res to zero

In your opinion this is a problem of the code or am I doing something wrong? Thank you RDickes,

best regards,

MarcoM

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/orcmkit/ORCmKit/issues/3#issuecomment-255573628, or mute the thread https://github.com/notifications/unsubscribe-auth/AHOuniEhawBAUUQQEwoz51c4DbKGRUeJks5q2wpggaJpZM4Jr5aN.

Rémi DICKES

PhD candidate/FRS-FNRS research fellow University of Liège - Faculty of Applied Sciences Energy System Research Unit Campus du Sart Tilman, Quartier Polytech 1 Allée de la Découverte 17 - Bât. B49 (P33) B–4000 LIEGE (BELGIUM) rdickes@ulg.ac.be +32 494.59.2253 +32 43.66.48.16


L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus

daebk12 commented 7 years ago

Hi Rémi,

I am now trying to run the matlab simulation using ORC model.

I would like to ask to @RDickes if he could add the .mat file for the loss model in the folder?

DP_folder = [path '\PressureDrops\']; load([DP_folder, 'ParametersCalibration_DP.mat']) param.LossesHP = DPHP_PhiDP; param.LossesHP.displayResults = 0; param.LossesHP.displayTS = 0;

Thank you so much!!

Jenny

RDickes commented 7 years ago

Hi Jenny, I have added an example of pressure drop parameters in the folder as well. ("PRESSURE_DROP_param_examples.mat").

Cheers, Rémi

daebk12 commented 7 years ago

Hi Rémi @RDickes ,

Thanks for uploading the an example of pressure drop parameters in the folder.

I have went through the expander model and loss model, both ok.

However, the HEX model, having a fatal error as presented below: (The CoolProp I used in the expander model works well, however not in the HEX model. )

HexModel Warning: Conformal state solver failed; error was conformal_state_solver took too many iterations; residual is 2.8144e-007; prior was 2.82068e-007 Error using CoolPropMATLAB_wrap Fatal error.

Error in CoolProp.PropsSI (line 2) [varargout{1:max(1,nargout)}] = CoolPropMATLAB_wrap(345,varargin{:});

Error in sf_PropsSI_bar (line 24) k = CoolProp.PropsSI('L', 'T', T, 'P',P, fluid);

Error in HEX_Qdotmax (line 171) Q_dot_hext_max = m_dot_hsf_PropsSI_bar('C', T_h_su, T_c_su, P_h_su, fluid_h)(T_h_su-T_c_su);

Error in HexModel (line 869) Q_dot_max = HEX_Qdotmax(fluid_h, m_dot_h, P_h_su, in_h_su, fluid_c, m_dot_c, P_c_su, in_c_su, param); %Compute the maximum heat power that can be transferred between the two media

And when I trying to run the ORC model, it shows the same error message.

Could you help me to solve this problem?

Thanks a lot.

Best regards, Jenny

RDickes commented 7 years ago

Hmm, that's a problem from CP, not the model itself. Could you send me an example of conditions when it crashed? For which fluid/P,T does the code fail? Is it only when computing the conductivity, or also with other properties ?

daebk12 commented 7 years ago

@RDickes Thanks for you reply. I have sent the example through email to you. Thanks!

RDickes commented 7 years ago

Hi Jenny,

The first error you are referring to is due to a miscalculation of the fluid property. It seems that the code tries to use CoolProp for computing the properties of the HTF Pirobloc, which is not possible (it is a fluid implemented manually in /the sf_PropsSI_bar/ function, it is not implemented in the CP library). I think the problem comes from a wrong parameter "param.type_h" provided to the heat exchanger model. Indeed, the HexModel function can handle both suplly enthalpies and temperatures as inputs for characterizing the fludis. Enthalpies are used for compressible fluids (and their properties are computed with CoolProp) while temperatures are used to simulated incompressible fluids (and their properties are calculated with the /sf_PropsSI_bar/ function). In order to specify either if the supply properties are temperatures or enthalpies, you must specify the param.type_h and param.type_c parameters. So if I were you, I would check that you are using a param.type_h = 'T' and not a param.type_h = 'H' when modelling the HTF Pirobloc Basic.

Le 23/12/2016 à 12:50, daebk12 a écrit :

@RDickes https://github.com/RDickes Thanks for you reply. I have sent the example through email to you. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/orcmkit/ORCmKit/issues/3#issuecomment-268979174, or mute the thread https://github.com/notifications/unsubscribe-auth/AHOunpVvpwkspgRJBpRCiPi-PYwlY-rvks5rK7VygaJpZM4Jr5aN.

-- Rémi DICKES

PhD candidate/FRS-FNRS research fellow University of Liège - Faculty of Applied Sciences Energy System Research Unit Campus du Sart Tilman, Quartier Polytech 1 Allée de la Découverte 17 - Bât. B49 (P33) B–4000 LIEGE (BELGIUM) rdickes@ulg.ac.be +32 494.59.2253 +32 43.66.48.16


L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus

RDickes commented 7 years ago

Jenny, for your second question, I have just added the gamma_R245fa.mat file in the "Fluid properties" folder. You should have access to it now

Le 23/12/2016 à 12:50, daebk12 a écrit :

@RDickes https://github.com/RDickes Thanks for you reply. I have sent the example through email to you. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/orcmkit/ORCmKit/issues/3#issuecomment-268979174, or mute the thread https://github.com/notifications/unsubscribe-auth/AHOunpVvpwkspgRJBpRCiPi-PYwlY-rvks5rK7VygaJpZM4Jr5aN.

-- Rémi DICKES

PhD candidate/FRS-FNRS research fellow University of Liège - Faculty of Applied Sciences Energy System Research Unit Campus du Sart Tilman, Quartier Polytech 1 Allée de la Découverte 17 - Bât. B49 (P33) B–4000 LIEGE (BELGIUM) rdickes@ulg.ac.be +32 494.59.2253 +32 43.66.48.16


L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus

daebk12 commented 7 years ago

Hi @RDickes Thanks for your previous reply for the ORC model. I have figured out the miscalculation issue. However, I came across another one with the pump model. Here are the error message when I am running the ORC.model

x0 evaluation: 1/81 Error using PumpModel (line 100) Not enough input arguments.

Error in OrcModel>OrganicRankineCycle_init2 (line 909) [out_PP, ~] = PumpModel(out.P_pp_su, out.h_pp_su, z(1), fluid_wf, N_pp, param.PP);

Error in OrcModel (line 178) guess = OrganicRankineCycle_init2(z, fluid_wf, fluid_htf, in_htf_su, T_htf_su, P_htf_su, m_dot_htf, fluid_ctf, in_ctf_su, T_ctf_su, P_ctf_su, m_dot_ctf, T_amb, N_exp, N_pp, param);

However, if I run the pumpmodel.m individually, the model is ok.

Thanks.

Jenny

orces commented 7 years ago

Hi @daebk12 I also have the same problem when running the ORC model.

Could you please help us to figure it ou? @davideziviani and @RDickes