是否有可能向 Ansys Mechanical 添加源术语?

问题描述

我正在尝试在 Ansys Mechanical 中进行瞬态热仿真。为了获得更合适的模拟,我想“添加一个源术语。特别是,我想在我的方程中添加一个减少程度,这与温度有关。

我尝试使用 APDL 命令执行此操作,但我对这种编程语言和 Ansys 中的例程都不太熟悉。

这是我目前想到的“伪代码”:

! ############################################
! Getting values and material data
! ############################################

*GET,NumberOfMeshElements,VOLU,COUNT,Body 1,! Number of Elements in Body 1
*GET,timestepSize,ACTIVE,SOLU,DTIME

*SET,CeriaAmount,1000 ! in mol 
*SET,ReductionEnthalpy,500 ! in kJ/mol O (

*SET,OxygenPartialPressure,100 ! Setting oxygen partial pressure
*SET,Temperature,TEMP ! Setting Temperature as a variable

*SET,ReductionExtent,0 ! prevIoUs reduction extent 

! ############################################
! Calculation of Source Term
! ############################################

! Begin of Loop for each time step

*DO,t,10,timestepSize ! solve together with transient thermal analysis (convection,radiation,conduction) 

ReductionExtent = 0.35 * EXP(Temperature) ! goal: storing of prevIoUs (t-1) value for later calculation of Rate of Change

! Begin of Loop for each element

*DO,i,1,1 ! needed for each mesh element because each mesh element has a different temperature

*GET,MeshElementVolume,ReductionExtentRateOfChange = ReductionExtent(t-1)- ReductionExtent(i) / timestepSize

S_reaction = - CeriaAmount / MeshElementVolume * ReductionEnthalpy * ReductionExtentRateOfChange ! usally a source term 

解决方法

显然有一种方法可以根据节点温度产生热量:

https://forum.ansys.com/discussion/1695/heat-generation

如果您需要此方法作为 APDL,您可以在工作台中对您的解决方案进行原型设计,然后在生成的 ds.dat 中查找 APDL 命令。

内部发热的APDL

您可以将 Arrehnius 方程拟合到多项式 Property = C0 + C1(T) + C2(T)^2 + C3(T)^3 + C4(T)^4 并将其作为您的材料模型 MP,QRATE,MATNUMBER,C0,C1,C2,C3,C4 或对由

创建的表名 (C0 = %QRATETABLE%) 的引用
*DIM,QRATETABLE,TABLE,5,TEMP                     !  Define QRATE with TEMP 
                                                   !              primary variable
QRATETABLE(1,0)=0.,50.,100.,150.,200.              ! Assign temperature values
QRATETABLE(1,1)=1,2,3,4,5                  ! Assign heat generation values !!! I am using dummy values !!!!

MP,%QRATETABLE%                   ! Input QRATE on the MP command