All-nodes boundary condition

Numerical methods and mathematical models of Elmer
Post Reply
einatlev
Posts: 47
Joined: 13 Jan 2010, 06:54

All-nodes boundary condition

Post by einatlev »

Hi all
I am trying to set the temperature of all the nodes in the model, so that other properties (e.g. viscosity) can depend on it. I would like to impose a temperature field calculated elsewhere, through an input file.
I successfully applied such a boundary condition on a boundary, following the example from:
viewtopic.php?f=9&t=1451

However, how can I do that for all the nodes in the model? Following the Manual, I tried

Code: Select all

Body 1
  Name = "lavabody"
 Target Bodies(1) = 2
  Equation = 1
  Material = 1
  Initial Condition = 1
  Body Force = 1
End

Body Force 1
  Temperature = Variable Coordinate
  Real
   include t.dat
  End
End
where t.dat holds nodes coordinates and temps, but it cause Elmer to crash violently...
I also tried making a file with node numbers and temperature (2 columns) and use "Temperature = Variable Node" and "Temperature = Variable NodeNumber", but that didn't help.
Ideas?
I suppose I can create a "restart file" and use that, but I was hoping for a simpler solution.
Thanks!!
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: All-nodes boundary condition

Post by raback »

Hi

You could make a small solver that reads in the data for your particular solver.

Or you could use DataToFieldSolver that takes any set of points and tried to make a field using them:
"Solves by Galerkin method the problem where a continuous field is
fitted to data. The data may be created in advance or it may be
given as a property of discrete particles. The data has a contribution
on the r.h.s. of the equation only. Regularization (i.e. diffusion) may be
added to reduce noice from the fitting of the data."

-Peter
einatlev
Posts: 47
Joined: 13 Jan 2010, 06:54

Re: All-nodes boundary condition

Post by einatlev »

Thanks Peter
I'm not familiar with the "DataToFieldSolver". Can you please give me an example? I can't find any documentation about this...
Thanks!
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: All-nodes boundary condition

Post by raback »

Hi

See, http://www.nic.funet.fi/pub/sci/physics ... Manual.pdf, Ch. 29

Documentation seems sparse to be frank. Additionally you need "Number of Points = Integer" and the data is a ascii matrices with [x y z f] in 3D and [z y f] in 2D.

-Peter
einatlev
Posts: 47
Joined: 13 Jan 2010, 06:54

Re: All-nodes boundary condition

Post by einatlev »

Thanks. So something like this:

Code: Select all

Solver 2
 Equation = String "DataToFieldSolver"
 Procedure = File "DataToFieldSolver" "DataToFieldSolver"
 Variable = String "Temperature"
 Data Field Name = String "t.dat"
End
This doesn't seem to work. I get

Code: Select all

Model Input:  Unlisted keyword: [data field name] in section: [solver 2]
Model Input:  Unlisted keyword: [tesnor field 1] in section: [solver 3]
At line 1325 of file ModelDescription.f90
Fortran runtime error: Bad real number in item 1 of list input
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: All-nodes boundary condition

Post by raback »

Hi

I don't that you even get that far. Check the spelling of "tesnor". Also, if the type is given it is just for information, it is not an error. Error may come from the misspelling, or somewhere else in the sif file.

-Peter
Post Reply