Elmer heat transfer solver difficulty

Numerical methods and mathematical models of Elmer
mcterry
Posts: 10
Joined: 04 Mar 2018, 01:05
Antispam: Yes

Re: Elmer heat transfer solver difficulty

Post by mcterry »

I believe the error shown above in my transient run MUST involve the call to the UDF in the Body Force section of the .sif. When I used the SAME .sif with the UDF call commented out, but invoke the constant value of the Heat Source, the transient program runs to completion. I am suspecting the selection of the Variable keyword in the Body Force block of the .sif. Since my Fortran function uses multiple arguments and uses one dummy argument, I do not know which existing variable to name as the "dummy" keyword.

I wrote a MATC routine to replace my Fortran UDF call, but then my Elmer run "hangs" for >10 minutes. Could MATC be THAT much slower than Fortran?
mcterry
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Elmer heat transfer solver difficulty

Post by mzenker »

Hi,

MATC is indeed much slower than a UDF. Difficult to say where the problem is without the UDF source code. If you can share it, someone could have a look and may say what is wrong.

Matthias
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Elmer heat transfer solver difficulty

Post by raback »

Hi

Maybe you could share the .F90 file and the way you refer it in the .sif file. There could be something wrong with that.

-Peter
mcterry
Posts: 10
Joined: 04 Mar 2018, 01:05
Antispam: Yes

Re: Elmer heat transfer solver difficulty

Post by mcterry »

I am attaching an edited version of my .f90 UDF. The .sif that connects with it was attached a few posts ago on 20 April at 15:16. The names of the .dll in my .sif and this edited .f90 do not match, but they did in all of my own tests.
In the .f90, I am attempting to pull in the values of nodal [x, y, z, Density] as well as the physical time Time from the Elmer Solver. I need these variables to compute the heat load which has spatial and temporal dependence in my UDF.
Notice also that I use a dummy argument DumArg in my .f90 code, since that is the instruction from the ElmerSolverManual when more than one argument is to be passed the UDF.
Then, in the .sif, I am not sure what variable keyword to use in the Body Force block when I invoke my Fortran UDF.
So overall, I am uncertain if I am knitting all of these bits together in the proper way. Note the error message in my Solver Log attached in my earlier 20 April 15:16 post where there seems to be some issue with memory usage.
Thank you to anyone who can assist.
Attachments
to Elmer edited.f90
Edited .f90 UDF with the essential parts retained
(2 KiB) Downloaded 266 times
mcterry
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Elmer heat transfer solver difficulty

Post by raback »

Hi

Solver is not associated in the code. You could use Model % Mesh to fetch time variable, or just ti=GetTime().

-Peter
mcterry
Posts: 10
Joined: 04 Mar 2018, 01:05
Antispam: Yes

Re: Elmer heat transfer solver difficulty

Post by mcterry »

Peter,
Thank you...I used
ti=GetTime()
and it works!
mcterry
Post Reply