Export solution in specific area

Numerical methods and mathematical models of Elmer
Post Reply
akirahinoshiro
Posts: 27
Joined: 13 Aug 2013, 16:50
Antispam: Yes

Export solution in specific area

Post by akirahinoshiro »

Hello,

I want to know how can I export a solution in a specific area.
I simulate the magnetic field with the whitney solvers.
After that I just need the B im and real in a field for example from x=-1..1 y=-1..1 z=0 or something like that. Another solution would be to export on a face I create in my mesh.
Can someone help me?
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Export solution in specific area

Post by mzenker »

Hi,

have a look at the SaveData/SaveLine solver (see Models manual for more info), it might be able to do what you want.

HTH,

Matthias
akirahinoshiro
Posts: 27
Joined: 13 Aug 2013, 16:50
Antispam: Yes

Re: Export solution in specific area

Post by akirahinoshiro »

I think the SaveLine Solver is the right for me.

In the 2d case I can use

Code: Select all

Solver 3
Exec Solver = After Simulation
Equation = SaveLine
Procedure = "SaveData" "SaveLine"
Filename = "line.dat"
Polyline coordinates(2,2) = -5e-3 5e-4 -5e-3 4.45e-3
End
But I didn't get it to work in the 3d case.
I can create several lines in 3d but I want to save a region.
To be specific
x=5e-3
y=5e-4...4.45e-3
z=-2.5e-3...2.5e-3

Paraview is not the best way because I want to automate it.
raback
Site Admin
Posts: 4828
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Export solution in specific area

Post by raback »

Hi

In vtu output you have many optional keywords, such as:

Code: Select all

Save Boundaries Only = Logical 
Save Bulk Only = Logical 
Mask Variable = String 
Mask Name = String
Mask Condition = String 
So you could give "Mask Name = String vtu" and set for the BCs you want to save "vtu = Logical True" and this should give what you need.

"Mask Condition" is a really new one. With that you can use a Real valued keyword in the Body force section to define whether to save some element or not. Se setting in Solver section "Mask Condition = String mymask" and in Body force, for example

Code: Select all

$rad=1.23
mymask = Real Variable Coordinate 
  Real MATC "tx(0)^2+tx(1)^2+tx(2)^2-rad^2"
Would only save stuff within a ball of given radius.

-Peter
Post Reply