Browse Source

opt:cfd新参数

wzj 5 months ago
parent
commit
d25fe3b755

+ 6 - 4
CMakeLists.txt.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 12.0.1, 2024-05-16T10:56:28. -->
+<!-- Written by QtCreator 12.0.1, 2024-05-18T12:35:17. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>
@@ -174,12 +174,14 @@
     <value type="int" key="PE.EnvironmentAspect.Base">2</value>
     <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
     <value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
-    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">GJDM</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.GJDM</value>
+    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">GJDM</value>
     <value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
     <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/project2023/projects/platformDM/Release/Release</value>
    </valuemap>
    <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
   </valuemap>

+ 57 - 6
src/CFD/CFDCalcSetting.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>254</width>
-    <height>548</height>
+    <width>300</width>
+    <height>710</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -38,9 +38,9 @@
       <property name="geometry">
        <rect>
         <x>0</x>
-        <y>0</y>
-        <width>238</width>
-        <height>710</height>
+        <y>-85</y>
+        <width>306</width>
+        <height>967</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_3">
@@ -210,7 +210,7 @@
        <item>
         <widget class="QGroupBox" name="groupBox_4">
          <property name="title">
-          <string/>
+          <string>流场计算迭代步数</string>
          </property>
          <layout class="QFormLayout" name="formLayout_2">
           <item row="0" column="0">
@@ -258,6 +258,57 @@
          </layout>
         </widget>
        </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_5">
+         <property name="title">
+          <string>热传导计算迭代步数</string>
+         </property>
+         <layout class="QFormLayout" name="formLayout_3">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_11">
+            <property name="text">
+             <string>初始流场迭代步数</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QLabel" name="label_12">
+            <property name="text">
+             <string>计算热传导的间隔步数</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <widget class="QLabel" name="label_13">
+            <property name="text">
+             <string>热传导迭代步数</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QDoubleSpinBox" name="TimeStepSizeSpin_2">
+            <property name="maximum">
+             <double>99999.000000000000000</double>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QSpinBox" name="IterationStepSpin_2">
+            <property name="maximum">
+             <number>9999</number>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1">
+           <widget class="QSpinBox" name="StepsPerCycleSpin_2">
+            <property name="maximum">
+             <number>99999</number>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
        <item>
         <widget class="QGroupBox" name="ActivateLoopMatrixGroup">
          <property name="title">

+ 70 - 6
src/CFD/CFDComputationalControlSetting.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>232</width>
-    <height>426</height>
+    <width>303</width>
+    <height>563</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -36,8 +36,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>230</width>
-        <height>424</height>
+        <width>301</width>
+        <height>561</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -58,7 +58,7 @@
        <item>
         <widget class="QGroupBox" name="groupBox">
          <property name="title">
-          <string/>
+          <string>流场域计算CLF</string>
          </property>
          <layout class="QHBoxLayout" name="horizontalLayout">
           <item>
@@ -76,7 +76,7 @@
                <double>9999.000000000000000</double>
               </property>
               <property name="value">
-               <double>1.000000000000000</double>
+               <double>0.500000000000000</double>
               </property>
              </widget>
             </item>
@@ -106,6 +106,53 @@
             </item>
             <item row="2" column="1">
              <widget class="QDoubleSpinBox" name="CFL_Update_Frequency">
+              <property name="maximum">
+               <double>9999.000000000000000</double>
+              </property>
+              <property name="value">
+               <double>20.000000000000000</double>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="groupBox_2">
+         <property name="title">
+          <string>热传导计算CLF</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_3">
+          <item>
+           <layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1">
+            <item row="0" column="0">
+             <widget class="QLabel" name="label_5">
+              <property name="text">
+               <string>常数初始值</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QDoubleSpinBox" name="startCFL_2">
+              <property name="maximum">
+               <double>9999.000000000000000</double>
+              </property>
+              <property name="value">
+               <double>10.000000000000000</double>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QLabel" name="label_6">
+              <property name="text">
+               <string>最大CLF数</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QDoubleSpinBox" name="CFL_MAX_2">
               <property name="maximum">
                <double>9999.000000000000000</double>
               </property>
@@ -114,6 +161,23 @@
               </property>
              </widget>
             </item>
+            <item row="2" column="0">
+             <widget class="QLabel" name="label_7">
+              <property name="text">
+               <string>CLF数更新频率</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="1">
+             <widget class="QDoubleSpinBox" name="CFL_Update_Frequency_2">
+              <property name="maximum">
+               <double>9999.000000000000000</double>
+              </property>
+              <property name="value">
+               <double>200.000000000000000</double>
+              </property>
+             </widget>
+            </item>
            </layout>
           </item>
          </layout>

+ 3 - 0
src/CFD/CFDFluidsSetting.cpp

@@ -12,6 +12,9 @@ namespace CFD
 		ui->nameLine->setPlaceholderText("默认理想气体");
 		connect(ui->okBnt,&QPushButton::clicked,this,&CFDFluidsSetting::saveData);
 		connect(ui->resetBnt,&QPushButton::clicked,this,&CFDFluidsSetting::resetData);
+		connect(ui->typeBox,QOverload<int>::of(&QComboBox::currentIndexChanged),this,[=](int index){
+			ui->stackedWidget->setCurrentIndex(index);
+		});
 	}
 
 

+ 252 - 18
src/CFD/CFDFluidsSetting.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>278</width>
-    <height>458</height>
+    <width>314</width>
+    <height>571</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -36,8 +36,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>278</width>
-        <height>442</height>
+        <width>330</width>
+        <height>552</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -95,17 +95,7 @@
            </item>
            <item>
             <property name="text">
-             <string>可压多组分气体</string>
-            </property>
-           </item>
-           <item>
-            <property name="text">
-             <string>不可压单相流</string>
-            </property>
-           </item>
-           <item>
-            <property name="text">
-             <string>不可压水气两相</string>
+             <string>可压多组分混合气体</string>
             </property>
            </item>
           </widget>
@@ -142,11 +132,255 @@
              <bool>false</bool>
             </property>
             <layout class="QVBoxLayout" name="verticalLayout_7">
+             <property name="leftMargin">
+              <number>0</number>
+             </property>
+             <property name="topMargin">
+              <number>0</number>
+             </property>
+             <property name="rightMargin">
+              <number>0</number>
+             </property>
+             <property name="bottomMargin">
+              <number>0</number>
+             </property>
              <item>
-              <widget class="QLabel" name="label_3">
-               <property name="text">
-                <string>待定</string>
+              <widget class="QStackedWidget" name="stackedWidget">
+               <property name="currentIndex">
+                <number>0</number>
                </property>
+               <widget class="QWidget" name="fluid1">
+                <layout class="QGridLayout" name="gridLayout">
+                 <item row="4" column="0">
+                  <widget class="QLabel" name="label_6">
+                   <property name="text">
+                    <string>热传导系数:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="2" column="0">
+                  <widget class="QLabel" name="label_5">
+                   <property name="text">
+                    <string>热传导系数模型:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="2" column="1">
+                  <widget class="QComboBox" name="comboBox_2">
+                   <item>
+                    <property name="text">
+                     <string>constant常数</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>分段多项式</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="6" column="0">
+                  <widget class="QLabel" name="label_7">
+                   <property name="text">
+                    <string>粘性系数模型:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="8" column="0">
+                  <widget class="QLabel" name="label_8">
+                   <property name="text">
+                    <string>粘性系数:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="1" column="1">
+                  <widget class="QDoubleSpinBox" name="doubleSpinBox">
+                   <property name="suffix">
+                    <string>  J/(kg-K)</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="10" column="1">
+                  <widget class="QDoubleSpinBox" name="doubleSpinBox_4">
+                   <property name="suffix">
+                    <string>  kg/kmol</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="6" column="1">
+                  <widget class="QComboBox" name="comboBox_3">
+                   <item>
+                    <property name="text">
+                     <string>constant常数</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>分段多项式</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="0" column="0">
+                  <widget class="QLabel" name="label_2">
+                   <property name="text">
+                    <string>比热容模型:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="4" column="1">
+                  <widget class="QDoubleSpinBox" name="doubleSpinBox_2">
+                   <property name="suffix">
+                    <string>  W/(m-k) </string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="0" column="1">
+                  <widget class="QComboBox" name="comboBox">
+                   <item>
+                    <property name="text">
+                     <string>constant常数</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>分段多项式</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="1" column="0">
+                  <widget class="QLabel" name="label_3">
+                   <property name="text">
+                    <string>比热容:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="8" column="1">
+                  <widget class="QDoubleSpinBox" name="doubleSpinBox_3">
+                   <property name="suffix">
+                    <string>  kg/(m-s)</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="10" column="0">
+                  <widget class="QLabel" name="label_9">
+                   <property name="text">
+                    <string>摩尔质量:</string>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
+               </widget>
+               <widget class="QWidget" name="fluid2">
+                <layout class="QGridLayout" name="gridLayout_2">
+                 <item row="0" column="0">
+                  <widget class="QLabel" name="label_10">
+                   <property name="text">
+                    <string>混合气体成分:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="0" column="1">
+                  <widget class="QPushButton" name="pushButton">
+                   <property name="text">
+                    <string>选择</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="1" column="0">
+                  <widget class="QLabel" name="label_11">
+                   <property name="text">
+                    <string>比热容模型:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="1" column="1">
+                  <widget class="QComboBox" name="comboBox_4">
+                   <property name="currentIndex">
+                    <number>2</number>
+                   </property>
+                   <item>
+                    <property name="text">
+                     <string>constant常数</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>分段多项式</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>mixing law</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="2" column="0">
+                  <widget class="QLabel" name="label_12">
+                   <property name="text">
+                    <string>热传导系数模型:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="2" column="1">
+                  <widget class="QComboBox" name="comboBox_5">
+                   <property name="currentIndex">
+                    <number>0</number>
+                   </property>
+                   <item>
+                    <property name="text">
+                     <string>constant常数</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>--</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="3" column="0">
+                  <widget class="QLabel" name="label_13">
+                   <property name="text">
+                    <string>粘性系数模型:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="3" column="1">
+                  <widget class="QComboBox" name="comboBox_6">
+                   <property name="currentIndex">
+                    <number>0</number>
+                   </property>
+                   <item>
+                    <property name="text">
+                     <string>constant常数</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>Sutherland’s Law</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="4" column="0">
+                  <widget class="QLabel" name="label_14">
+                   <property name="text">
+                    <string>质量扩散系数:</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="4" column="1">
+                  <widget class="QDoubleSpinBox" name="doubleSpinBox_5">
+                   <property name="suffix">
+                    <string>  m2/s</string>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
+               </widget>
               </widget>
              </item>
             </layout>

+ 27 - 2
src/CFD/CFDSingleton.h

@@ -37,8 +37,10 @@ namespace CFD
 												//1024– Interface_Overset (嵌套网格交界面,本软件定义)
 												//2024 – Interface_Sliding (滑移网格滑移面,本软件定义)
 		int					MovingIndex;
+		int					WallThermalType;    //绝热壁(物面热力学类型:0-ADIABATIC; 1- ISOTEMP; 2-HEATFLUX; 3- via_MAPPED_INTERFACE)
 		int					ThermoIndex;
 		double				StaticTemperature;
+		double				HeatFluxDensity;
 		double				Velocity;
 		QVector<double>		ncoord;
 		double				Omega;
@@ -69,7 +71,7 @@ namespace CFD
 		QString				MeshZoneName;				//本网格名字
 		QString				MeshFileName;				//网格文件路径
 		double				Scaling;					//网格缩放因子
-		int					MaterialType;				//本网格域的介质类型(0—FLUID; 1--SOLID
+		int					MaterialType;				//本网格域的介质类型(1—FluidZone;1017—SolidHeatTransZone; 2017—SolidStructZone; 3017-- SolidThermStructZone
 		int					MaterialID;					//本网格域材质的ID号(对应前面第3节定义的流体或固体材质ID号,流体/固体材质各自编号)
 		int					DynamicMeshType;			//动网格类型  0 – 静态网格  1 – 刚体运动网格
 		int					Avg_Cp_Export_Flag = 0;		//默认为0
@@ -133,6 +135,18 @@ namespace CFD
 	{
 		QString				FluidName;
 		int					FluidMaterialType;
+		//fluidType = 1
+		int					SpecificHeatModel;			//fluidType = 2
+		double				SpecificHeat;
+		int					ThermalConductivityModel;	//fluidType = 2
+		double				ThermalConductivity;
+		int					ViscosityModel;				//fluidType = 2
+		double				Viscosity;
+		double				MolecularWeight;
+		//fluidType = 2
+		double				MassDiffusivity;
+
+		//fluidType = 3 / 4
 		double				Density_air=1.225;			//fluidType =3 / 4
 		double				Viscosity_air=1.7894e-5;	//fluidType =3 / 4
 		double				Density_water=1.225;		//fluidType =4
@@ -143,7 +157,10 @@ namespace CFD
 	struct CFDAPI CFDSolid
 	{
 		QString SolidName;
-		int SolidMaterialType;
+		int SolidMaterialType = 1;
+		double Density = 2719;
+		double SpecificHeat = 871;
+		double ThermalConductivity = 202.4;
 	};
 
 	//总体数据
@@ -182,6 +199,11 @@ namespace CFD
 			//物理时间精度(当为非定常模式,即IsUnsteady为true时启用)
 		int					TimeAccuracy;				//物理时间精度(1 -- 一阶精度非定常 2 -- 二阶精度非定常)(默认为2)
 		int					InnerIteration = 15;		//最大内迭代步数,定常取1,非定常默认取15,可设置
+			//热传导计算迭代步数设置
+		unsigned int		StartIter_Heat;				//启用流热耦合计算前的初始流场迭代步数
+		unsigned int		IterInterval_Heat;			//计算热传导的间隔步数(非定常默认为1,定常默认500)
+		unsigned int		HeatInnerIteration;			//热传导计算的迭代步数(300左右)
+
 			//计算格式高级选项
 		int					ConvectiveFluxscheme = 0;	//对流通量格式 (0 – Roe迎风 1 – AUSM迎风	2—AUSM+迎风) 默认为0
 		int					LimiterType;				//斜率限制器类型 (1 – VENKATAKARISHNAN	;3 – MINMOD;4 – VanLeer;5 -- SuperBee),可默认为1
@@ -197,6 +219,9 @@ namespace CFD
 		double				StartCFL;					//Courant-Number常数初始值,取1.0左右
 		double				CFL_MAX;					//允许最大CFL数,(越大收敛越快,但也更容易导致计算不稳定而发散)
 		int					CFL_Update_Frequency;		//CFL数更新频率,定常推荐100~200迭代步,非定常推荐20迭代步
+		double				HeatCFL_Start;				//Courant-Number常数初始值,取1.0左右
+		double				HeatCFL_MAX;				//允许最大CFL数,(越大收敛越快,但也更容易导致计算不稳定而发散)
+		int					HeatCFL_Update_Frequency;	//CFL数更新频率,定常推荐100~200迭代步,非定常推荐20迭代步
 
 		//参考值设置
 		double				Ref_Pressure;				//参考压力,Pa

+ 72 - 5
src/CFD/CFDSolidSetting.ui

@@ -36,8 +36,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>278</width>
-        <height>440</height>
+        <width>286</width>
+        <height>437</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -93,14 +93,81 @@
          <property name="checkable">
           <bool>false</bool>
          </property>
-         <layout class="QVBoxLayout" name="verticalLayout_7">
-          <item>
+         <layout class="QGridLayout" name="gridLayout">
+          <item row="0" column="0">
            <widget class="QLabel" name="label_3">
             <property name="text">
-             <string>待定</string>
+             <string>选择固体材料:</string>
             </property>
            </widget>
           </item>
+          <item row="0" column="1">
+           <widget class="QPushButton" name="pushButton">
+            <property name="text">
+             <string>选择</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" colspan="2">
+           <widget class="QWidget" name="widget" native="true">
+            <layout class="QGridLayout" name="gridLayout_2">
+             <property name="leftMargin">
+              <number>0</number>
+             </property>
+             <property name="topMargin">
+              <number>0</number>
+             </property>
+             <property name="rightMargin">
+              <number>0</number>
+             </property>
+             <property name="bottomMargin">
+              <number>0</number>
+             </property>
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_2">
+               <property name="text">
+                <string>密度:</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QDoubleSpinBox" name="doubleSpinBox">
+               <property name="suffix">
+                <string>  kg/m3</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_5">
+               <property name="text">
+                <string>比热容:</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QDoubleSpinBox" name="doubleSpinBox_2">
+               <property name="suffix">
+                <string>  J/(kg-K)</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_6">
+               <property name="text">
+                <string>热传导系数:</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="QDoubleSpinBox" name="doubleSpinBox_3">
+               <property name="suffix">
+                <string>  W/(m-k)</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
          </layout>
         </widget>
        </item>

+ 10 - 5
src/IR/IRmodtranWidget.cpp

@@ -279,9 +279,10 @@ namespace IR
 		QTextStream in(&type7File);
 		QString line;
 		bool isBlockStarted = false;
-		while(in.readLineInto(&line))
+		while(!in.atEnd())
 		{
-			if(line.contains("FEQR"))
+			line = in.readLine();
+			if(line.contains("FREQ"))
 			{
 				isBlockStarted = true;
 				continue;
@@ -294,7 +295,8 @@ namespace IR
 
 			if(isBlockStarted && !line.isEmpty())
 			{
-				QStringList fields = line.split(' ', Qt::SkipEmptyParts);
+				line = line.trimmed();
+				QStringList fields = line.split(QRegExp("\\s+"));
 				if (fields.size() > 1)
 				{
 					bool freqOk, totalRadOk;
@@ -310,8 +312,12 @@ namespace IR
 		}
 		type7File.close();
 
+		QDir dir(Modtran_DB + "/" + text);
+		if(!dir.exists())
+			dir.mkdir(Modtran_DB + "/" + text);
+
 		text += "/ir_环境亮度.dat";
-		QFile datFile(text);
+		QFile datFile(Modtran_DB + "/" + text);
 		if(!datFile.open(QIODevice::WriteOnly | QIODevice::Text))
 		{
 			qDebug() << "file error";
@@ -375,7 +381,6 @@ namespace IR
 			}
 			if(isBlockStarted && !line.isEmpty())
 			{
-				// QStringList fields = line.split(' ', Qt::SkipEmptyParts);
 				line = line.trimmed();
 				QStringList fields = line.split(QRegExp("\\s+"));