hi everyone!
i want to get the conversion parameters of a reaction in a conversion reactor with Excel VBA. the parameter named C0, C1 C2 and in the following equation. " conversion(%) = C0 + C1 * T + C2 * T^2"
any suggestion was welcome!
thank you !
|
|
Posted 11 July 2016 - 02:54 AM
hi everyone!
i want to get the conversion parameters of a reaction in a conversion reactor with Excel VBA. the parameter named C0, C1 C2 and in the following equation. " conversion(%) = C0 + C1 * T + C2 * T^2"
any suggestion was welcome!
thank you !
Posted 11 July 2016 - 08:40 AM
Try the Object Explorer. Visit the Aspen Tech support site.
Bobby
Posted 11 July 2016 - 06:06 PM
Dear bamboo:
In this simple case, you can use the linear estimation function in excel to determine the parameters you are looking for:
https://support.offi...7a-fa7abf772b6d
Best regards.
Posted 12 July 2016 - 01:51 AM
Try the Object Explorer. Visit the Aspen Tech support site.
Bobby
thank you Bobby, I am sorry, I use the aspen HYSYS software.
Posted 12 July 2016 - 02:07 AM
Dear bamboo:
In this simple case, you can use the linear estimation function in excel to determine the parameters you are looking for:
https://support.offi...7a-fa7abf772b6d
Best regards.
thank you Francisco Angel, i was trying to "catch" the values in aspen hysys. your information is useful to my VBA program work. than you again!
Posted 12 July 2016 - 08:53 AM
Try the Object Explorer. Visit the Aspen Tech support site.
Bobby
thank you Bobby, I am sorry, I use the aspen HYSYS software.
The site provides support for your software. They own it.
Posted 12 July 2016 - 09:10 AM
Try the Object Explorer. Visit the Aspen Tech support site.
Bobby
Dear Bobby,
in hysys object, the conversioncoefficientsvalue defined as variant which was found in the class named "ConversionReaction" and also was in class named "ConversionReactor".
i defined a variable (reactor) as ConversionReactor, and a other variant variable named parameters.
then i set the reactor = hycase.flowsheet.operator.item("CRV_100")
and the variable "parameters = reactor.ConversionCoefficientValue"
but the error occurs!
thank you for your attention!
Posted 12 July 2016 - 09:34 AM
hycase.flowsheet.operations.item("CRV_100")
Syntax and spelling are everything!
Bobby
Posted 13 July 2016 - 06:02 AM
hycase.flowsheet.operations.item("CRV_100")
Syntax and spelling are everything!
Bobby
Dear Bobby,
the "operations" is right. and there was no "operator" in the HYSYS object.
here i defined two variables:
' --------------------------------------------------------------
Dim React_Operator As ConversionReactor
Dim varConCoeffValue As Variant
Set React_Operator = hyCase.Flowsheet.Operation.Item("CRV_100")
varConCoeffValue = React_Operator.ConversionCoefficientsValue
' -----------------------------------------------------------------------
all of this was right. and i want i get the values of "varConCoeffvalue" , How can I get it?
thank you for your reply!
Edited by Bamboo, 13 July 2016 - 06:30 AM.
Posted 13 July 2016 - 09:07 AM
I don't have a specific answer for you. Maybe another member can give you specific information. But you should visit the Aspen Tech support site and search. There is something called HYSYS Stream Reporter among the VBA workbooks that have lots of code. Try to find a solution that addresses your need for reactor information.
Bobby
Edited by Bobby Strain, 13 July 2016 - 10:50 AM.
Posted 14 July 2016 - 01:55 AM
I don't have a specific answer for you. Maybe another member can give you specific information. But you should visit the Aspen Tech support site and search. There is something called HYSYS Stream Reporter among the VBA workbooks that have lots of code. Try to find a solution that addresses your need for reactor information.
Bobby
thank you Bobby! I am going to find some similar code from "HSR", and also waiting for a specific information.
Posted 14 July 2016 - 11:21 AM
I found this on the support site using the search engine. Return the first conversion coefficient value thus:
ConvCoeffs = TheRxn.ConversionCoefficientsValue.ConvCoeffs(0).Value
The Value returned is in HYSYS default units. And I don't know what they are for temperature. You will need to check. In any event, what you are retrieving is input, so you can easily check the values in your simulation. And, since it is input, why are you fetching it?
Variables and parameters as as per definitions in the attachment. Consult the customize guide in the user manual to be sure that I have the right names, etc. Or use the object explorer now that you know where to look.
Can I access HYSYS Reactions using OLE.htm 80.44KB
15 downloads
Edited by Bobby Strain, 14 July 2016 - 11:38 AM.
Posted 15 July 2016 - 01:37 AM
I found this on the support site using the search engine. Return the first conversion coefficient value thus:
ConvCoeffs = TheRxn.ConversionCoefficientsValue.ConvCoeffs(0).Value
The Value returned is in HYSYS default units. And I don't know what they are for temperature. You will need to check. In any event, what you are retrieving is input, so you can easily check the values in your simulation. And, since it is input, why are you fetching it?
Variables and parameters as as per definitions in the attachment. Consult the customize guide in the user manual to be sure that I have the right names, etc. Or use the object explorer now that you know where to look.
thank you Bobby! Actually I want "give" values to the conversion use my equation.
because when i "get" the value easily, then I can "send value" to the variable easily.
Posted 15 July 2016 - 09:45 AM
You should ask questions directly, stating what you want to do. In this case, the attachment has all that you need, and answers the question you did not ask. You need to look carefully at how to get and set things. Reactions are a bit different than stream properties when sending values. Or getting values. And the code above to get the value probably isn't quite right. Maybe you can let me know how to do that.
Bobby
Posted 30 August 2016 - 02:36 AM
You should ask questions directly, stating what you want to do. In this case, the attachment has all that you need, and answers the question you did not ask. You need to look carefully at how to get and set things. Reactions are a bit different than stream properties when sending values. Or getting values. And the code above to get the value probably isn't quite right. Maybe you can let me know how to do that.
Bobby
thank you Bobby, the attachment is vary helpful to me.
Steam Flow And Heating Time In Batch ReactorStarted by Guest_seagal6_* , 16 Jul 2025 |
|
|
||
Multi-Tubular Packed Bed ReactorStarted by Guest_shambola_* , 12 Feb 2025 |
|
|
||
Help On Simulation Of Reactor In Aspen PlusStarted by Guest_m.ghaziasgar_* , 06 Jan 2025 |
|
|
||
Secondary Heating Loop For ReactorStarted by Guest_TheChemEng_* , 28 Nov 2024 |
|
|
||
Need Help For Utility Flow Rate Calculation For A Chemical ReactorStarted by Guest_Asisr_* , 12 Sep 2024 |
|
|