Ignore a body (consider transparent) in ViewFactors

Numerical methods and mathematical models of Elmer
Post Reply
adamo
Posts: 19
Joined: 02 Feb 2017, 00:19
Antispam: Yes

Ignore a body (consider transparent) in ViewFactors

Post by adamo »

Dear Elmer community,

I am facing a problem, in which I have to capture both heat conduction and radiation through an air layer. Both of them are, unfortunately, important in this case and I ran into an issue with the ViewFactors.

I am able to reproduce the tutorials and create any analogical geometry consisting of open or closed bodies radiating towards each other, see picture below
Image
As you can see, the box is heating the spherical shell and in the solver logs, I see the ViewFactors nicely summing to 1.0 or close.

However, in the case that I am solving, the space between the layer is filled with air. In the final simulation, the air should conduct the heat and thereby contribute to the heat transfer between the box and the shell. As a test case, I set the thermal conductivity of the air to 0.0, its transmissivity to 1.0 and its emissivity to 0.0 but the result is apparently incorrect, as you can see in the picture below. In fact, the inner face of the spherical shell is not heated, but cooled a bit.
Image

I noticed in the solver logs that the ViewFactor calculation fails in the above case as the ViewFactor sums lie between 0.0 and 0.4. I think this is because the air still acts as an obstacle in the raytracing algorithm. Is there a way I could convince Elmer to ignore a certain body (or consider it fully transparent) when calculating the ViewFactors?

Thank you very much for any advice

Adam
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Ignore a body (consider transparent) in ViewFactors

Post by raback »

Hi

By default normals point out of bodies. When you have an interface the normal does not know where to point and hence the viewing may be to wrong direction.

As a remedy long time ago I coded an alternative way to give "Emissivity" at the material section. Give it only for the solids and omit for the boundary. This way the view factor computation uses a convention where normals always point out of some material having emissivity defined.

-Peter
adamo
Posts: 19
Joined: 02 Feb 2017, 00:19
Antispam: Yes

Re: Ignore a body (consider transparent) in ViewFactors

Post by adamo »

Thanks a lot, Peter! It seems to have helped!

For anyone who might encounter this issue in future, it is also important to remove the Radiation Target Body = -1 from the boundary condition section because this would also override Peter's trick. Below is the complete casefile that I used in the end.

Adam

Code: Select all

Check Keywords Warn

Header
  Mesh DB "." "simple3dmesh"
End

Constants
  Stefan Boltzmann = 5.67e-8
End

Simulation
  Max Output Level = 3
  Coordinate System = Cartesian 3D
  Simulation Type = Steady State
  Steady State Max Iterations = 5
  Output Intervals = 1
! Output File = "radiation.result"
 Post File = "radiation.vtu"
  View Factors ="ViewFactors.dat"
End

Body 1
  Equation = 1
  Material = 1
  Body Force = 1
  Initial Condition = 1
End

Body 2
  Equation = 1
  Material = 2
  Initial Condition = 1
End

Body 3
  Equation = 1
  Material = 1
  Initial Condition = 1
End

Initial Condition 1
  Temperature = Real 100.0
End

Body Force 1
  Heat Source = 400000
End

Material 1
   Density = 1.0
   Heat Capacity = 1.0
   Heat Conductivity = 10.0
   Emissivity = 0.6
End

Material 2
   Density = 1.0
   Heat Capacity = 1.0
   Heat Conductivity = 0.0
End

Solver 1
  Equation = Heat Equation
  Procedure = "HeatSolve" "HeatSolver"
  Stabilize = True
  Linear System Solver = Iterative
  Linear System Direct Method = UMFPack
  Linear System Iterative Method = BiCGStab
  Linear System Convergence Tolerance = 1.0e-8
  Linear System Max Iterations = 500
  Linear System Preconditioning = ILU
  Nonlinear System Newton After Iterations = 1
  Nonlinear System Newton After Tolerance = 0.1
  Nonlinear System Max Iterations = 50
  Steady State Convergence Tolerance = 1.0e-5
  NonLinear System Convergence Tolerance = 1.0e-5
  Nonlinear System Relaxation Factor = 1.0

  Viewfactor raytrace tolerance   = real 0.001
  Viewfactor area tolerance   = real 0.01
  Viewfactor factor tolerance = real 0.001
End

Equation 1
  Active Solvers(1) = 1
End

Boundary Condition 1
   Target Boundaries(1) = 1
   Name = "Radiating Boundary 1"
   Heat Flux BC = True
   Radiation = Diffuse Gray
End

Boundary Condition 2
   Target Boundaries(1) = 2
   Name = "Radiating Boundary 2"
   Heat Flux BC = True
   Radiation = Diffuse Gray
End

Boundary Condition 3
   Target Boundaries(1) = 3
   Temperature = Real 100
End

adamo
Posts: 19
Joined: 02 Feb 2017, 00:19
Antispam: Yes

Re: Ignore a body (consider transparent) in ViewFactors

Post by adamo »

Hi Peter and Elmer Users,

two days later, I ran into a further issue with the ViewFactors functionality. Specifically, I am getting stuck on the Error occurred in umf4num: -1.0000000000000000 error.

I did find several forums where this was discussed but the most recent ones were from 2013. I know that this error means that UMFPack ran out of memory but the thing is that I am not using UMFPack. I specified BiCGStab as the solver in my casefile. Just in case, I also set the Linear System Direct Solver = MUMPS.

So I have been wondering:
- Is ViewFactors calling the UMFPack regardless of my choice of solver?
- Can I work around this in any way?
- Could this be related to the size of the ViewFactors.dat, which is 2-3GB? Would it help if I reduce its size by reducing precision of the numbers?

It seems to me that once I have the View factors calculated, there should not be so much computational load related to their application

Thanks a lot for any advice

Adam
adamo
Posts: 19
Joined: 02 Feb 2017, 00:19
Antispam: Yes

Re: Ignore a body (consider transparent) in ViewFactors

Post by adamo »

Replying to myself, I searched the source code of RadiationFactors.F90 and by setting Gebhardt Factors Solver Iterative = Logical True, I managed to start solving the Radiation Factors using the CGS solver

However, my geometry is rather large, with around 30 000 radiating surface elements, and the simulation is, therefore, extremely slow on a single core (I am running on around 16 cores without radiation). I do understand that the radiation model probably does not support multi-core calculations now but is there a way I could partition my geometry so that I can be sure that the whole radiating cavity is contained within one partition?

Many thanks

Adam
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Ignore a body (consider transparent) in ViewFactors

Post by raback »

Hi Adam,

The radiation hasn't been actively pushed for parallel computing. We did develop it a lot for crystal growth many years ago but particularly in 3D it is very expensive.

You could find a better compromise with the radiation using 2nd order elements. The view factors are still computed in the same way but all other physics is dealt with quadratic elements.

For parallel computing you have a flag "-connect" after which listing the related boundaries you can request that all dofs belong to same partition. I think this works with "-metis & -partdual".

If you have several cavities that do not see each other you can treat them separately. This is useful since the stupid algo is N^3.

-Peter
Post Reply