# parse name
name=name[:len(name)-len("_doubleSpinBox")]#On retire le suffixe _doubleSpinBox
if name.endswith("Conductivity") :
- dictCF["Conductivity"]=val
+ dictCF[name]=val
elif name.endswith("Conductivity_Phase1") :
- dictCF["Conductivity1"]=val
+ dictCF[name]=val
elif name.endswith("Conductivity_Phase2") :
- dictCF["Conductivity2"]=val
+ dictCF[name]=val
elif name.endswith("Viscosity") :
- dictCF["Viscosity"]=val
+ dictCF[name]=val
elif name.endswith("Viscosity_Phase1") :
- dictCF["Viscosity1"]=val
+ dictCF[name]=val
elif name.endswith("Viscosity_Phase2") :
- dictCF["Viscosity2"]=val
+ dictCF[name]=val
elif name.endswith("HeatSource") :
- dictCF["HeatSource"]=val
+ dictCF[name]=val
elif name.endswith("FrictionCoefficients") :
- dictCF["FrictionCoefficients"]=val
+ dictCF[name]=val
elif name.endswith("Gravity_1d") :
- dictCF["Gravity_1d"]=val
+ dictCF[name]=val
elif name.endswith("Gravity_2d") :
- dictCF["Gravity_2d"]=val
+ dictCF[name]=val
elif name.endswith("Gravity_3d") :
- dictCF["Gravity_3d"]=val
+ dictCF[name]=val
elif name=="Xinf" :
dictCF["Xinf"]=val
elif name=="Xsup" :
elif name.endswith("_IC") :#Initial conditions
name=name[:len(name)-len("_IC")]#On retire le suffixe _IC
if name.endswith("Concentration") :
- dictCF["InitialConcentration"]=val
+ dictCF[name]=val
elif name.endswith("Alpha") :
- dictCF["InitialAlpha"]=val
+ dictCF[name]=val
elif name.endswith("Pressure") :
- dictCF["InitialPressure"]=val
+ dictCF[name]=val
elif name.endswith("Temperature") :
- dictCF["InitialTemperature"]=val
+ dictCF[name]=val
elif name.endswith("Velocity_1d") :
- dictCF["InitialVelocity_1d"]=val
+ dictCF[name]=val
elif name.endswith("Velocity_2d") :
- dictCF["InitialVelocity_2d"]=val
+ dictCF[name]=val
elif name.endswith("Velocity_3d") :
- dictCF["InitialVelocity_3d"]=val
+ dictCF[name]=val
elif name.endswith("_BC") :#Boundary conditions
- name=name[3:len(name)-len("_BC")]#On retire le préfixe SP_ ou DM_ au début et le suffixe _BC à la fin
+ name=name[:len(name)-len("_BC")]#On retire le suffixe _BC à la fin
dictCF[name]=val
elif name.endswith('comboBox'):
assert(isinstance(att, QtWidgets.QComboBox))
elif name.endswith("GasOrLiquid") :
dictCF["fluidType"]=val
elif name.endswith("_BC") :#Boundary conditions
- name=name[4:len(name)-len("_BC")]#On retire le préfixe SP_ ou DM_ au début et le suffixe _BC à la fin
+ name=name[:len(name)-len("_BC")]#On retire le suffixe _BC à la fin
dictCF[name]=val
elif name=="NO_Method" :
dictCF["Method"]=val
print("Reading widgets")
dictCF = self.scanWidgets()
- print("Setting Model, ModelName = ", dictCF["ModelName"], ", pressureEstimate = ", dictCF["pressureEstimate"], ", InitialPressure = ", dictCF["InitialPressure"], ", InitialVelocity_1d = ", dictCF["InitialVelocity_1d"], ", InitialTemperature= ", dictCF["InitialTemperature"])
+ print("Setting Model, ModelName = ", dictCF["ModelName"], ", pressureEstimate = ", dictCF["pressureEstimate"])#, ", InitialPressure = ", dictCF["InitialPressure"], ", InitialVelocity_1d = ", dictCF["InitialVelocity_1d"], ", InitialTemperature= ", dictCF["InitialTemperature"])
######## Setting Model and initil state #########################
if dictCF["ModelName"]=="SinglePhase" :
myProblem = eval('cf.%s(cf.%s,cf.%s,%s)' % (dictCF["ModelName"],dictCF["fluidType"],dictCF["pressureEstimate"],dictCF["spaceDim"]))
nVar = myProblem.getNumberOfVariables()
VV_Constant =[0]*nVar
- VV_Constant[0] = dictCF["InitialPressure"]
- VV_Constant[1] = dictCF["InitialVelocity_1d"]
+ VV_Constant[0] = dictCF["SP_Pressure"]
+ VV_Constant[1] = dictCF["SP_Velocity_1d"]
if dictCF["spaceDim"] >1 :
- VV_Constant[2] = dictCF["InitialVelocity_2d"]
+ VV_Constant[2] = dictCF["SP_Velocity_2d"]
if dictCF["spaceDim"] >2 :
- VV_Constant[3] = dictCF["InitialVelocity_3d"]
- VV_Constant[nVar-1] = dictCF["InitialTemperature"]
+ VV_Constant[3] = dictCF["SP_Velocity_3d"]
+ VV_Constant[nVar-1] = dictCF["SP_Temperature"]
elif dictCF["ModelName"]=="DriftModel" :
myProblem = eval("cf.%s(cf.%s,%s)" % (dictCF["ModelName"],dictCF["pressureEstimate"],dictCF["spaceDim"]))
nVar = myProblem.getNumberOfVariables()
VV_Constant =[0]*nVar
- VV_Constant[0] = dictCF["InitialConcentration"]
- VV_Constant[1] = dictCF["InitialPressure"]
- VV_Constant[2] = dictCF["InitialVelocity_1d"]
+ VV_Constant[0] = dictCF["DM_Concentration"]
+ VV_Constant[1] = dictCF["DM_Pressure"]
+ VV_Constant[2] = dictCF["DM_Velocity_1d"]
if dictCF["spaceDim"] >1 :
- VV_Constant[3] = dictCF["InitialVelocity_2d"]
+ VV_Constant[3] = dictCF["DM_Velocity_2d"]
if dictCF["spaceDim"] >2 :
- VV_Constant[4] = dictCF["InitialVelocity_3d"]
- VV_Constant[nVar-1] = dictCF["InitialTemperature"]
+ VV_Constant[4] = dictCF["DM_Velocity_3d"]
+ VV_Constant[nVar-1] = dictCF["DM_Temperature"]
else :
raise NameError('Model not yet handled', dictCF["ModelName"])
# #exec(line)
# self._python_dump.append(line)
- print("Setting boundary conditions, Temperature_Left = ", dictCF["Temperature_Left"], ", Velocity_1d_Left = ", dictCF["Velocity_1d_Left"], ", Pressure_Right = ", dictCF["Pressure_Right"])
+ print("Setting boundary conditions")#", Temperature_Left = ", dictCF["Temperature_Left"], ", Velocity_1d_Left = ", dictCF["Velocity_1d_Left"], ", Pressure_Right = ", dictCF["Pressure_Right"])
######## 1D for the moment ######################
if dictCF["ModelName"]=="SinglePhase" :
- myProblem.setInletBoundaryCondition("Left",dictCF["Temperature_Left"],dictCF["Velocity_1d_Left"])
- myProblem.setOutletBoundaryCondition("Right", dictCF["Pressure_Right"]);
+ myProblem.setInletBoundaryCondition("Left",dictCF["SP_Temperature_Left"],dictCF["SP_Velocity_1d_Left"])
+ myProblem.setOutletBoundaryCondition("Right", dictCF["SP_Pressure_Right"]);
elif dictCF["ModelName"]=="DriftModel" :
myProblem.setInletBoundaryCondition("Left",dictCF["DM_Temperature_Left"],dictCF["DM_Concentration_Left"],dictCF["DM_Velocity_1d_Left"])
myProblem.setOutletBoundaryCondition("Right", dictCF["DM_Pressure_Right"]);
- print("Setting source terms, HeatSource = ", dictCF["HeatSource"], ", Gravity_1d = ", dictCF["Gravity_1d"])
+ print("Setting source terms")#", HeatSource = ", dictCF["HeatSource"], ", Gravity_1d = ", dictCF["Gravity_1d"])
########## Physical forces #################
- myProblem.setHeatSource(dictCF["HeatSource"]);
- gravite=[0]*dictCF["spaceDim"]
- gravite[0]=dictCF["Gravity_1d"]
- if dictCF["spaceDim"] >1 :
- gravite[1]=dictCF["Gravity_2d"]
- if dictCF["spaceDim"] >2 :
- gravite[2]=dictCF["Gravity_3d"]
+ if dictCF["ModelName"]=="SinglePhase" :
+ myProblem.setHeatSource(dictCF["SP_HeatSource"]);
+ gravite=[0]*dictCF["spaceDim"]
+ gravite[0]=dictCF["SP_Gravity_1d"]
+ if dictCF["spaceDim"] >1 :
+ gravite[1]=dictCF["SP_Gravity_2d"]
+ if dictCF["spaceDim"] >2 :
+ gravite[2]=dictCF["SP_Gravity_3d"]
+ elif dictCF["ModelName"]=="DriftModel" :
+ myProblem.setHeatSource(dictCF["DM_HeatSource"]);
+ gravite=[0]*dictCF["spaceDim"]
+ gravite[0]=dictCF["DM_Gravity_1d"]
+ if dictCF["spaceDim"] >1 :
+ gravite[1]=dictCF["DM_Gravity_2d"]
+ if dictCF["spaceDim"] >2 :
+ gravite[2]=dictCF["DM_Gravity_3d"]
+ else :
+ raise NameError('Model not yet handled', dictCF["ModelName"])
+
myProblem.setGravity(gravite)
print("Setting numerical options, NumericalScheme = ", dictCF["Scheme"], ", NumericalMethod = ", dictCF["Method"], ", CFL = ", dictCF["CFL"])
</widget>
<widget class="QWidget" name="Mesh">
<attribute name="title">
- <string>Mesh</string>
+ <string>Mesh choice</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_59">
<item row="0" column="0">
<double>1000000099.990000009536743</double>
</property>
<property name="value">
- <double>-5.000000000000000</double>
+ <double>-1.000000000000000</double>
</property>
</widget>
</widget>
<double>1000000099.990000009536743</double>
</property>
<property name="value">
- <double>5.000000000000000</double>
+ <double>1.000000000000000</double>
</property>
</widget>
</widget>
<number>2147483647</number>
</property>
<property name="value">
- <number>20</number>
+ <number>50</number>
</property>
</widget>
</widget>
<double>1000000099.990000009536743</double>
</property>
<property name="value">
- <double>-5.000000000000000</double>
+ <double>-1.000000000000000</double>
</property>
</widget>
</widget>
<double>1000000099.990000009536743</double>
</property>
<property name="value">
- <double>5.000000000000000</double>
+ <double>1.000000000000000</double>
</property>
</widget>
</widget>
<number>2147483647</number>
</property>
<property name="value">
- <number>20</number>
+ <number>50</number>
</property>
</widget>
</widget>
<double>1000000099.990000009536743</double>
</property>
<property name="value">
- <double>-5.000000000000000</double>
+ <double>-1.000000000000000</double>
</property>
</widget>
</widget>
<double>1000000099.990000009536743</double>
</property>
<property name="value">
- <double>5.000000000000000</double>
+ <double>1.000000000000000</double>
</property>
</widget>
</widget>
<number>2147483647</number>
</property>
<property name="value">
- <number>20</number>
+ <number>50</number>
</property>
</widget>
</widget>
</widget>
<widget class="QWidget" name="SinglePhaseModel">
<attribute name="title">
- <string>Physical</string>
+ <string>Physical model</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_79">
<item row="0" column="0" colspan="2">
</font>
</property>
<property name="text">
- <string>Porosity friction</string>
+ <string>Friction coefficient</string>
</property>
</widget>
</item>
</font>
</property>
<property name="title">
- <string>Initial condition</string>
+ <string>Initial conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_78">
<item row="0" column="0">
<pointsize>11</pointsize>
</font>
</property>
+ <property name="editable">
+ <bool>false</bool>
+ </property>
<item>
<property name="text">
<string>Liquid</string>
</item>
<item>
<property name="text">
- <string>Vapour</string>
+ <string>Gas</string>
</property>
</item>
</widget>
</font>
</property>
<property name="text">
- <string><html><head/><body><p><span style=" color:#ff0000;">Estimate pressure</span></p></body></html></string>
+ <string><html><head/><body><p><span style=" color:#ff0000;">Pressure regime</span></p></body></html></string>
</property>
</widget>
</item>
</font>
</property>
<property name="title">
- <string>Boundary condition</string>
+ <string>Boundary conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_64">
<item row="0" column="0">
</widget>
<widget class="QWidget" name="DriftModel">
<attribute name="title">
- <string>Physical</string>
+ <string>Physical model</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_69">
<item row="0" column="0" rowspan="2" colspan="3">
</font>
</property>
<property name="text">
- <string>Porosity friction coefficient</string>
+ <string>Friction coefficients</string>
</property>
</widget>
</item>
</font>
</property>
<property name="title">
- <string>Initial condition</string>
+ <string>Initial conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_67">
<item row="0" column="0">
</font>
</property>
<property name="text">
- <string><html><head/><body><p><span style=" color:#ff0000;">Estimate pressure</span></p></body></html></string>
+ <string><html><head/><body><p><span style=" color:#ff0000;">Pressure regime</span></p></body></html></string>
</property>
</widget>
</item>
</font>
</property>
<property name="title">
- <string>Boundary condition</string>
+ <string>Boundary conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_47">
<item row="0" column="0">
<double>0.010000000000000</double>
</property>
<property name="value">
- <double>1.000000000000000</double>
+ <double>0.000000000000000</double>
</property>
</widget>
</widget>
<double>0.010000000000000</double>
</property>
<property name="value">
- <double>1.000000000000000</double>
+ <double>0.000000000000000</double>
</property>
</widget>
</widget>
<double>0.010000000000000</double>
</property>
<property name="value">
- <double>1.000000000000000</double>
+ <double>0.000000000000000</double>
</property>
</widget>
</widget>
</widget>
<widget class="QWidget" name="FiveEqsTwoFluidModel">
<attribute name="title">
- <string>Physical</string>
+ <string>Physical model</string>
</attribute>
<widget class="QGroupBox" name="FEqs_InitialCondition">
<property name="geometry">
</font>
</property>
<property name="text">
- <string>Liquid/Fluid</string>
+ <string>Pressure regime</string>
</property>
</widget>
- <widget class="QComboBox" name="FEqs_FluidOrLiquid">
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- </font>
- </property>
- <item>
- <property name="text">
- <string>--</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Fluid</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Liquid</string>
- </property>
- </item>
- </widget>
<widget class="QComboBox" name="FEqs_1barOr155bar">
<property name="font">
<font>
</item>
<item>
<property name="text">
- <string>Arround1bar</string>
+ <string>Arround1bar300K</string>
</property>
</item>
<item>
<property name="text">
- <string>Arround155bar</string>
+ <string>Arround155bars600K</string>
</property>
</item>
</widget>
</font>
</property>
<property name="title">
- <string>Boundary condition</string>
+ <string>Boundary conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_20">
<item row="0" column="0">
</font>
</property>
<property name="text">
- <string>Viscosity ( Pa*s )</string>
+ <string>Viscosities ( Pa*s )</string>
</property>
</widget>
</item>
</font>
</property>
<property name="text">
- <string>Conductivity ( W/m/K )</string>
+ <string>Conductivities ( W/m/K )</string>
</property>
</widget>
</item>
</font>
</property>
<property name="text">
- <string>Interfacial friction coefficients</string>
+ <string>Friction coefficients</string>
</property>
</widget>
</item>
</widget>
<widget class="QWidget" name="IsothermalTwoFluidModel">
<attribute name="title">
- <string>Physical</string>
+ <string>Physical model</string>
</attribute>
<widget class="QSplitter" name="splitter_2">
<property name="geometry">
<layout class="QHBoxLayout" name="Iso2F_PhysicalOptionsLayout">
<item>
<layout class="QVBoxLayout" name="Iso2F_PhysicalOptionsLayoutV_2">
- <item>
- <widget class="QLabel" name="Iso2F_HeatSource">
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- </font>
- </property>
- <property name="text">
- <string>Heat Source ( W/m^dim )</string>
- </property>
- </widget>
- </item>
<item>
<widget class="QLabel" name="Iso2F_Viscosity">
<property name="font">
</property>
</widget>
</item>
- <item>
- <widget class="QLabel" name="Iso2F_Conductivity">
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- </font>
- </property>
- <property name="text">
- <string>Conductivity ( W/m/K )</string>
- </property>
- </widget>
- </item>
<item>
<widget class="QLabel" name="Iso2F_Gravity">
<property name="font">
</item>
<item>
<layout class="QVBoxLayout" name="Iso2F_PhysicalOptionsLayoutV">
- <item>
- <widget class="QDoubleSpinBox" name="Iso2F_HeatSource_doubleSpinBox">
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- </font>
- </property>
- <property name="maximum">
- <double>1000000000.000000000000000</double>
- </property>
- </widget>
- </item>
<item>
<widget class="QDoubleSpinBox" name="Iso2F_ViscositydoubleSpinBox">
<property name="font">
</property>
</widget>
</item>
- <item>
- <widget class="QDoubleSpinBox" name="Iso2F_Conductivity_doubleSpinBox">
- <property name="font">
- <font>
- <pointsize>11</pointsize>
- </font>
- </property>
- <property name="maximum">
- <double>1000000000.000000000000000</double>
- </property>
- </widget>
- </item>
<item>
<layout class="QHBoxLayout" name="Iso2F_Gravity_hLayout">
<item>
</font>
</property>
<property name="title">
- <string>Initial condition</string>
+ <string>Initial conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_24">
<item row="0" column="0">
</item>
<item>
<property name="text">
- <string>Arround1bar</string>
+ <string>Arround1bar300K</string>
</property>
</item>
<item>
<property name="text">
- <string>Arround155bar</string>
+ <string>Arround155bar600K</string>
</property>
</item>
</widget>
</font>
</property>
<property name="title">
- <string>Boundary condition</string>
+ <string>Boundary conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_26">
<item row="0" column="0">
</widget>
<widget class="QWidget" name="DiffusionEquationModel">
<attribute name="title">
- <string>Physical</string>
+ <string>Physical model</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_48">
<item row="0" column="0" colspan="2">
</font>
</property>
<property name="title">
- <string>Boundary condition</string>
+ <string>Boundary conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_37">
<item row="0" column="0">
</widget>
<widget class="QWidget" name="TransportEquationModel">
<attribute name="title">
- <string>Physical</string>
+ <string>Physical model</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_54">
<item row="0" column="0" colspan="2">
</font>
</property>
<property name="text">
- <string><html><head/><body><p><span style=" color:#ff0000;">Estimate pressure</span></p></body></html></string>
+ <string><html><head/><body><p><span style=" color:#ff0000;">Pressure regime</span></p></body></html></string>
</property>
</widget>
</item>
</property>
<item>
<property name="text">
- <string>Arround 1bar 300K</string>
+ <string>Arround 1bar300K</string>
</property>
</item>
<item>
<property name="text">
- <string>Arround 155bar 600K</string>
+ <string>Arround 155bars600K</string>
</property>
</item>
</widget>
</font>
</property>
<property name="title">
- <string>Boundary condition</string>
+ <string>Boundary conditions</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0">
</widget>
<widget class="QWidget" name="NumercalOptions">
<attribute name="title">
- <string>Numerical</string>
+ <string>Numerical options</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<double>0.000001000000000</double>
</property>
<property name="value">
- <double>0.000100000000000</double>
+ <double>0.000001000000000</double>
</property>
</widget>
</item>
</size>
</property>
<property name="text">
- <string>MyCoreFlowsSimulation</string>
+ <string>MySolverLabSimulation</string>
</property>
</widget>
</item>
<tabstop>FEqs_Gravity_3d_doubleSpinBox</tabstop>
<tabstop>FEqs_FrictionCoefficients_Phase1_doubleSpinBox</tabstop>
<tabstop>FEqs_FrictionCoefficients_Phase2_doubleSpinBox</tabstop>
- <tabstop>FEqs_FluidOrLiquid</tabstop>
<tabstop>FEqs_1barOr155bar</tabstop>
<tabstop>FEqs_BC_Wall_GroupName_lineEdit</tabstop>
<tabstop>FEqs_BC_Wall_Temperature_doubleSpinBox</tabstop>
<tabstop>FEqs_BC_Neumann_GroupName_lineEdit</tabstop>
<tabstop>FEqs_BC_Outlet_GroupNamelineEdit</tabstop>
<tabstop>FEqs_BC_Outlet_PressuredoubleSpinBox</tabstop>
- <tabstop>Iso2F_HeatSource_doubleSpinBox</tabstop>
<tabstop>Iso2F_ViscositydoubleSpinBox</tabstop>
- <tabstop>Iso2F_Conductivity_doubleSpinBox</tabstop>
<tabstop>Iso2F_Gravity_1d_doubleSpinBox</tabstop>
<tabstop>Iso2F_Gravity_2d_doubleSpinBox</tabstop>
<tabstop>Iso2F_Gravity_3d_doubleSpinBox</tabstop>