The Way to Make Your Home Smell Like Christmas

Numerical methods and mathematical models of Elmer
Post Reply
annier
Posts: 1107
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: problem with long input in MATC?

Post by annier » 04 Nov 2018, 21:57

Hi sage12,
the MATC expression has a length limit of 128 characters (viewtopic.php?f=3&t=110).
For expressions longer than 128 characters, we have to formulate a function (the function feature in elmer has no limit in length) and link it as a function in MATC expression, as shown in the following examples.
1. In, viewtopic.php?f=3&t=4070 ,

Code: Select all

Heat Source = Variable Coordinate 1, Coordinate 2, Time; Real MATC    "test(tx)"
and function test(x) is defined in the solver input file. Moreover, we can utilize functions for longer expressions in connection to material properties (can be found from the post illustrated in case of Ja(t) function used as $ Ja(0) for current density 3, in the same link).
2. In, https://github.com/anilkunwar/elmerfem/ ... oKthml.sif,

Code: Select all

Heat conductivity(3,3) = Variable Coordinate 1, Coordinate 2
  Real MATC "test(tx)"
and function test(x) is defined in the solver input file.


The name of the function is arbitrary:
anyfuncname(y), where y is arbitrarily chosen (= it can be any alphabet), and within MATC expression, it is written as : anyfuncname(tx)




Yours Sincerely,
Anil Kunwar

mzenker
Posts: 1807
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: problem with long input in MATC?

Post by mzenker » 05 Nov 2018, 12:02

Hi,

at a first glance, your condition seems like a table would be easier? You can use tables of any length, even from external files.

HTH,

Matthias

ReneeDegutis
Posts: 2
Joined: 20 Nov 2018, 18:27
Antispam: Yes

Re: problem with long input in MATC?

Post by ReneeDegutis » 03 Dec 2018, 09:24

annier wrote:
04 Nov 2018, 21:57
Hi sage12,
the MATC expression has a length limit of 128 characters (viewtopic.php?f=3&t=110).
For expressions longer than 128 characters, we have to formulate a function (the function feature in elmer has no limit in length) and link it as a function in MATC expression, as shown in the following examples.
1. In, viewtopic.php?f=3&t=4070 ,

Code: Select all

Heat Source = Variable Coordinate 1, Coordinate 2, Time; Real MATC    "test(tx)"
and function test(x) is defined in the solver input file. Moreover, we can utilize functions for longer expressions in connection to material properties (can be found from the post illustrated in case of Ja(t) function used as $ Ja(0) for current density 3, in the same link).
2. In, https://github.com/anilkunwar/elmerfem/ ... oKwritemyessayin6hoursthml.sif,

Code: Select all

Heat conductivity(3,3) = Variable Coordinate 1, Coordinate 2
  Real MATC "test(tx)"
and function test(x) is defined in the solver input file.


The name of the function is arbitrary:
anyfuncname(y), where y is arbitrarily chosen (= it can be any alphabet), and within MATC expression, it is written as : anyfuncname(tx)




Yours Sincerely,
Anil Kunwar


Hello Anil,

How does the the thermal conductivity tensor change due to the length? Is there a specific way to apply the changes using the table?

Thanks,
Renee

Post Reply