-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fb asim 4672 missing emulsion models #247
Changes from 10 commits
9c39ff0
85bb5a2
6982619
cfeedc3
2a006e1
9754276
47cda3b
07dddfe
5e8041a
19bc185
c40eccc
794e670
f828fd5
af1206f
0aaaa1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,12 @@ class EmulsionRelativeViscosityModelType(Enum): | |
Mooney1951a = "mooney1951a" | ||
Mooney1951b = "mooney1951b" | ||
FromPlugin = "from_plugin" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer to put There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this would require some treatment when loading old cases. I don't know if it is worthy to do such modification There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We save the "string" not some auto index or some thing like that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! Thanks for the explanation @prusse-martin! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I also prefer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right @prusse-martin.
|
||
PalRhodes1989 = "pal_rhodes1989" | ||
Ronningsen1995 = "ronningsen1995" | ||
VolumetricWeight = "volumetric_weight" | ||
Woelflin1942 = "woelflin_1942" | ||
BarneaMizrahi1976 = "barnea_mizrahi1976" | ||
TableBased = "table_based" | ||
|
||
|
||
class EmulsionDropletSizeModelType(Enum): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1785,6 +1785,8 @@ def calculate_relative_emulsion_viscosity( | |
mu_disp: "double", | ||
mu_cont: "double", | ||
alpha_disp_in_layer: "double", | ||
T: "double", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that changing hook signatures will cause incompatibility with existing plugins. I also think you should update the docstring to properly document the signature, I think that is what goes to the online documentation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will break the existing plugins indeed and I forgot to update changelog and the docstring.
Yes, T is for temperature and creating another hook is not viable. Fortunately as far as I know there is nobody using this plugin, so this change probably won't bother anyone There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In fact I have updated the changelog. It was only the docstring that was missed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
OK... I will let it pass for now =P |
||
water_in_oil: "bool", | ||
) -> "int": | ||
""" | ||
**c++ signature** : ``HOOK_RELATIVE_EMULSION_VISCOSITY(void* ctx, double* mu_r, double mu_disp, double mu_cont, double alpha_disp_in_layer)`` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -908,14 +908,18 @@ DLL_EXPORT int get_liq_liq_shear_force_per_volume_input_variable( | |
@param[in] mu_disp Dispersed Field Viscosity [Pa.s]. | ||
@param[in] mu_cont Continuous Field Viscosity [Pa.s]. | ||
@param[in] alpha_disp_in_layer Dispersed Field Volume Fraction in the layer (emulsion) [m3 of dispersed field /m3 of layer]. | ||
@param[in] T Fluid temperature [K]. | ||
@param[in] water_in_oil True when water is dispersed in oil, otherwise it is a dispersion of oil in water. | ||
@return An #error_code value. | ||
*/ | ||
DLL_EXPORT int get_relative_emulsion_viscosity( | ||
void* ctx, | ||
double* out, | ||
double mu_disp, | ||
double mu_cont, | ||
double alpha_disp_in_layer | ||
double alpha_disp_in_layer, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to {{comment on hook_specs.py}}. |
||
double T, | ||
bool water_in_oil | ||
); | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ typedef int (*get_tracer_partition_coefficient_func)(void* ctx, double* out, voi | |
typedef int (*get_plugin_input_data_multiplereference_selected_size_func)(void* ctx, int* indexes_size, const char* plugin_id, const char* var_name); | ||
typedef int (*get_input_variable_func)(void* ctx, double* out, const char* var_name, int phase_id); | ||
typedef int (*get_ucm_fluid_geometrical_properties_func)(void* ctx, double* S_w, double* S_i, double* H, double alpha_G, double D); | ||
typedef int (*get_relative_emulsion_viscosity_func)(void* ctx, double* out, double mu_disp, double mu_cont, double alpha_disp_in_layer, int disp_field_id, int cont_field_id); | ||
typedef int (*get_relative_emulsion_viscosity_func)(void* ctx, double* out, double mu_disp, double mu_cont, double alpha_disp_in_layer, double T, bool water_in_oil); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to {{comment on hook_specs.py}}. |
||
|
||
struct ALFAsimSDK_API { | ||
#if defined(_WIN32) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I forgot to ask you to add this entry in the previous PR.