Can I reference total mass or mass of a body in a user defined function?

General discussion about Elmer
Post Reply
ScientistRenzo
Posts: 55
Joined: 14 Mar 2021, 21:01
Antispam: Yes

Can I reference total mass or mass of a body in a user defined function?

Post by ScientistRenzo »

Hello :D!

I'd like to apply 10 Grey = 10 J /kg by using the heat source.
Heat source is in W/kg, so that is (J/s)/kg.
I've chosen my mass to be 1 kg.
So I have creative freedom, and I can apply Heat Source = 1 for 10 seconds, or Heat Source = 10 for 1 second, in order to apply 10 J/kg to my 1 kg model.

Let's say my mass is 2 kg, so I need to apply Heat Source = 2 for 10 seconds, or Heat Source = 20 for 1 second

I'd like to parameterize my user defined function.

So let's say I want to apply 10 Grey to my model, using a user defined function (in fortran) where Heat Source = "x"

Is there some way to reference the total mass, or mass of a body in Elmer, so I can do Heat Source = 10 * mass, which would get the goal completed.

Please excuse me if it's somewhere in the manuals, it was easier and nicer to ask.

Thanks :D!
raback
Site Admin
Posts: 4173
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Can I reference total mass or mass of a body in a user defined function?

Post by raback »

Hi

You could use the keyword:

Code: Select all

Volumetric Heat Source = ...
that should be in units W/m^3.

-Peter
ScientistRenzo
Posts: 55
Joined: 14 Mar 2021, 21:01
Antispam: Yes

Re: Can I reference total mass or mass of a body in a user defined function?

Post by ScientistRenzo »

Peter if you don't mind checking this post, viewtopic.php?f=7&t=7430&p=24797#p24797

:D
Post Reply