Time dependent Boundary Conditions
Time dependent Boundary Conditions
Hi, everybody.
I am new user of Elmer.
I would like to know if it is possible to specify in the ElmerGUI boundary conditions depending on time?
Thanks in advance,
Martin
I am new user of Elmer.
I would like to know if it is possible to specify in the ElmerGUI boundary conditions depending on time?
Thanks in advance,
Martin
Re: Time dependent Boundary Conditions
HI Martin,
yes this is possible. Activate the input field in question, and press "Enter". A small input
text editor should appear. In the text editor write
Variable time
Real MATC "sin(tx)"
for example, and close the window.
(The tx(0:n1) array always referes to listed names in the "Variable x,y,z,..." syntax,
in this example the first and only entry is the "time").
Regards, Juha
yes this is possible. Activate the input field in question, and press "Enter". A small input
text editor should appear. In the text editor write
Variable time
Real MATC "sin(tx)"
for example, and close the window.
(The tx(0:n1) array always referes to listed names in the "Variable x,y,z,..." syntax,
in this example the first and only entry is the "time").
Regards, Juha
Re: Time dependent Boundary Conditions
Juha, thank you for your quick replay.
I wrote in the text editor of the corresponding boundary condition the following:
Variable time
if ( time<=3600 ) 0.617
else 0.0
But, when I run the problem I received the message:
ERROR:: Model Input: For property
name:[boundary condition 4]
Could you tell me what I did wrong?
Regards,
Martin
I wrote in the text editor of the corresponding boundary condition the following:
Variable time
if ( time<=3600 ) 0.617
else 0.0
But, when I run the problem I received the message:
ERROR:: Model Input: For property
name:[boundary condition 4]
Could you tell me what I did wrong?
Regards,
Martin
Juha wrote:HI Martin,
yes this is possible. Activate the input field in question, and press "Enter". A small input
text editor should appear. In the text editor write
Variable time
Real MATC "sin(tx)"
for example, and close the window.
(The tx(0:n1) array always referes to listed names in the "Variable x,y,z,..." syntax,
in this example the first and only entry is the "time").
Regards, Juha
Re: Time dependent Boundary Conditions
I think I understood now, the correct way is as follows:
Variable time
Real MATC "0.617*(tx<=3600)"
Variable time
Real MATC "0.617*(tx<=3600)"
Re: Time dependent Boundary Conditions
Hi,
this should also work
Juha
this should also work
Code: Select all
Variable time
if ( time<=3600 ) { 0.617 } else { 0.0 }
Re: Time dependent Boundary Conditions
Hello everybody,
I was wondering if it is possible to prescribe a Dirichlet boundary condition up to a time and then release it, so that it becomes a noflux "natural" boundary condition.
I've tried
But it crashes after Time=3.
I've also tried
But I get following error:
ERROR:: Model Input:
ERROR:: Model Input: Unknown specifier: [if]
ERROR:: Model Input: In section: [boundary condition 1]
ERROR:: Model Input: For property name:[variable time]
Any ideas?
Thank you.
Kind regards,
Andrés
I was wondering if it is possible to prescribe a Dirichlet boundary condition up to a time and then release it, so that it becomes a noflux "natural" boundary condition.
I've tried
Code: Select all
MyVar= Variable Time; Real MATC "if(tx<3) 1"
I've also tried
Code: Select all
Variable Time; if ( tx<=3600 ) { MyVar = 1}
ERROR:: Model Input:
ERROR:: Model Input: Unknown specifier: [if]
ERROR:: Model Input: In section: [boundary condition 1]
ERROR:: Model Input: For property name:[variable time]
Any ideas?
Thank you.
Kind regards,
Andrés
Re: Time dependent Boundary Conditions
Hi,
It seems your variable is undefined after Time=3, so Elmer crashes.
How about
See MATC manual for more info.
HTH,
Matthias
It seems your variable is undefined after Time=3, so Elmer crashes.
How about
Code: Select all
MyVar = Variable Time; Real MATC "if (tx<3) 1; else 0;"
HTH,
Matthias
Re: Time dependent Boundary Conditions
Hi Matthias,
Thank you for your reply.
The thing is that I don't want to prescribe a "MyVar = 0" Dirichlet BC after Time = 3, but a noflux boundary condition (natural BC), i.e. the simplest Neumann BC.
Such a noflux boundary condition is accomplished naturally when no Dirichlet BC is prescribed, because the integrals over the boundary elements should be zero. That is why I need to prescribe the Dirichlet BC before Time = 3, and then somehow "release" this BC.
I've been thinking that I could restart the Simulation after Time = 3 and define different BCs in the new job.. But is there a simpler way?
Andrés
Thank you for your reply.
The thing is that I don't want to prescribe a "MyVar = 0" Dirichlet BC after Time = 3, but a noflux boundary condition (natural BC), i.e. the simplest Neumann BC.
Such a noflux boundary condition is accomplished naturally when no Dirichlet BC is prescribed, because the integrals over the boundary elements should be zero. That is why I need to prescribe the Dirichlet BC before Time = 3, and then somehow "release" this BC.
I've been thinking that I could restart the Simulation after Time = 3 and define different BCs in the new job.. But is there a simpler way?
Andrés

 Site Admin
 Posts: 3699
 Joined: 22 Aug 2009, 11:57
 Antispam: Yes
 Location: Espoo, Finland
 Contact:
Re: Time dependent Boundary Conditions
Hi Andrés
To any Dirichlet condition for "Varname" there is a related trigger which can turn it on/off called "Varname Condition". When this has positive value Dirichlet condition is active, when positive passive. So for your case,
Peter
To any Dirichlet condition for "Varname" there is a related trigger which can turn it on/off called "Varname Condition". When this has positive value Dirichlet condition is active, when positive passive. So for your case,
Code: Select all
Temperature = 1.0
Temperature Condition = Variable Time
Real MATC "3.0001tx"