Dear Peter,
That's awesome!!!
Can the cpar directly obtain the temperature of the control point?
If it can it seems ok not to use udf,like
Code: Select all
Heat Source = Variable "cpar,time,Div Poynting Vector re"
Real MATC "if(tx(0)<600) abs(tx(2))/1050-4761.9;else -4761.9;"
However,the cpar is cooling down.
My udf is like this
Code: Select all
FUNCTION AlternatingSource(Model, n, x) RESULT(ht)
USE DefUtils
IMPLICIT None
TYPE(Model_t) :: Model
INTEGER :: n
REAL(KIND=dp) :: x(2),ht
TYPE(Variable_t), POINTER :: PoyVar,TmpVar
REAL(KIND=dp) :: hvar,tlimit,hcon,time,tpoint,Poy
tpoint = x(1)
time = x(2)
Poyvar => VariableGet( Model % Mesh % Variables,'Div Poynting Vector re')
Poy = Poyvar % Values(Poyvar % Perm(n))
hvar = abs(Poy)/1050
hcon = -4761.9
tlimit = 600.0
ht = hcon + hvar
if (tpoint <= tlimit) then
ht = hcon + hvar
else
ht = hcon
end if
END FUNCTION AlternatingSource
Code: Select all
Body Force 1
Name = "Body Force 1"
Heat Source = Variable "cpar,time"
Real Procedure "AlternatingSource" "AlternatingSource"
End
The cpar is also cooling down.
Where did I do it wrong?I don't know how to output the "Control Node".
Code: Select all
1: value: cpar scalar variable
2: min: temperature
3: max: temperature
4: res: energy functional
5: res: energy functional im
6: res: integral of div poynting vector
7: res: integral of div poynting vector im
2.882617911464E+002 2.881196149044E+002 4.657663500887E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.882617911464E+002 2.881196149040E+002 4.657663500889E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.835235822981E+002 2.833215529593E+002 6.238696959501E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.835235822981E+002 2.833215529593E+002 6.238696959501E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.787853734648E+002 2.787525679870E+002 7.716777643860E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.787853734648E+002 2.787525679870E+002 7.716777643860E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.740471646704E+002 2.740188638475E+002 9.095108828271E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.740471646704E+002 2.740188638475E+002 9.095108828272E+002 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.693089559758E+002 2.693088396988E+002 1.039593507943E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.693089559758E+002 2.693088396988E+002 1.039593507943E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.645707475406E+002 2.645707426069E+002 1.163721239813E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.645707475406E+002 2.645707426069E+002 1.163721239813E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.598325397845E+002 2.598325241430E+002 1.283215686876E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.598325397845E+002 2.598325241430E+002 1.283215686876E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.550943338209E+002 2.550943017185E+002 1.399023026161E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.550943338209E+002 2.550943017185E+002 1.399023026161E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.503561325543E+002 2.503561030315E+002 1.511820537330E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.503561325543E+002 2.503561030315E+002 1.511820537330E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.456179431772E+002 2.456179062392E+002 1.622099815974E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.456179431772E+002 2.456179062392E+002 1.622099815974E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.408797821107E+002 2.408797010383E+002 1.730225565664E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002
2.408797821107E+002 2.408797010383E+002 1.730225565664E+003 1.772125454693E+013 -5.315369959778E+014 -6.298030660700E+002 -5.755972840402E+002