Thunderhead Engineering Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum moved to https://forum.thunderheadeng.com

Author Topic: Mesh Alignment  (Read 9334 times)

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Mesh Alignment
« on: May 16, 2011, 12:49:04 pm »

I have two adjacent rooms of unequal height & width:

mesh boundary(m):
smaller: (0,8.5), (0,9.1), (0.3.0)
larger: (8.5, 17.1), (0, 9.1), (0, 9.1)

Cells seem to align well - two cells of smaller mesh match exactly
with one cell of the larger one:

larger cell size: 0.32 x 0.30 x 0.34
smaller cell size: 0.16 x 0.15 x 0.17

larger: x,y,z cells:  27, 30, 27
smaller: x,y,z cells: 54, 60, 18

pyrosim & fds errors state that the meshes are unaligned

any help to fix this error is greatly appreaciated? thanks

Logged

Charlie Thornton

  • Thunderhead
  • *****
  • Posts: 851
    • View Profile
Re: Mesh Alignment
« Reply #1 on: May 16, 2011, 01:16:57 pm »

You've got a good start because your big cells are twice as big as your little cells. That means that as long as both meshes begin and end on coordinates that are divisible by the big cells you are in good shape (this gets tricky  when you only have an opportunity to match up two grids on occasional common divisors).

If you can, it's also helpful to mentally remap the coordinate axes based on the cell sizes you've chosen. For example, since your larger cell size is 0.32 m, only start your meshes on coordinates that can be divided by your cell size choices. (e.g. 0.34, 0.68, 1.02, ...).  In this case, that might mean using the following Z boundaries for your meshes:

small(z): 0.0 - 3.06 (i.e. 0.34 * 0 to 0.34 * 9)
larger(z): 0.0 -  9.18 (i.e. 0.34 * 0 to 0.34 * 27)

Of course, you don't have to start at 0.0, but you'll need to use an offset that allows you to match up coordinates along common divisors.
Logged

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Re: Mesh Alignment
« Reply #2 on: May 16, 2011, 01:27:51 pm »

Thank you Charlie, So, that means, I would not be able to use Simulation Parameters->Misc->default surface to say "concrete" since mesh boundaries are not room boundaries. I have to manually setup the concrete walls.. right?
Logged

Charlie Thornton

  • Thunderhead
  • *****
  • Posts: 851
    • View Profile
Re: Mesh Alignment
« Reply #3 on: May 16, 2011, 01:45:45 pm »

I don't understand the relationship between your question and my comment. Are you concerned that by raising the ceiling of the larger mesh 8 centimeters that you will no longer match your geometry?  (and similar for the smaller mesh) Unfortunately, without a grid line at Z=9.1 you wouldn't be able to add an obstruction to act as the new ceiling - it would snap to the nearest grid line. You could lower the top to Z=8.76 or could change your cell size to allow your mesh to hit 9.1 exactly.
Logged

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Re: Mesh Alignment
« Reply #4 on: May 16, 2011, 02:30:34 pm »

I am trying to "change your cell size to allow your mesh to hit 9.1 exactly"
using non-uniform division method:

Direction   Num Cells    Cell Size       Geometry & Mesh Size
X   20    0.425        8.5
Y   24    0.379167    9.1
Z   8    0.375       3

Is this valid? for some reason, Edit Meshes does not throw any error, rather reverts to "uniform" methods and erases all that I have entered above.

Thanks
Logged

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Re: Mesh Alignment
« Reply #5 on: May 17, 2011, 07:51:13 am »

Is it at all possible to align all mesh and room boundaries in a
multiple mesh geometry?
Thanks
Logged

Charlie Thornton

  • Thunderhead
  • *****
  • Posts: 851
    • View Profile
Re: Mesh Alignment
« Reply #6 on: May 17, 2011, 08:38:43 am »

To your previous question about the non-uniform mesh changing to uniform - it looks like you entered a uniform mesh. For it to be truly non-uniform you would need different sizes of cells in at least one axis. E.g. X: 10x0.1 m cells, then 20x0.05 m cells. PyroSim identified that your mesh was actually a uniform mesh and reset the editor accordingly.

Sure, it's possible to align multiple meshes. Though, it can be tricky if the cell sizes you want don't line up with the room dimensions you want. When I'm doing it, I try to work with nice easy numbers for all the cell sizes so it doesn't start to seem like some weird over-constrained problem (e.g. 0.1 m, 0.05 meters, etc). Then if I want a room to end at 5.63 meters, I just adjust that back to 5.60.

The next PyroSim release should have some helpers for doing work in parallel. We've got an idea about telling it to split a mesh against a bounding box (with some refinement parameters) and it would automatically turn one mesh into nine. I'm not sure if that'll make it in or not, but we do recognize that lining up multiple meshes can be tricky.
Logged

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Re: Mesh Alignment
« Reply #7 on: May 17, 2011, 09:06:57 am »

Thanks, 3 of my meshes have passed the alignment test.

Now, I am trying to Run FDS in parallel with MPI enabled. I get the following error and simulation is aborted:

forrtl: severe (157): Program exception - access violation.

Image             PC          Routine Line
fds5_mpi.exe                unknown unknown


Would you rather recommend OpenMP with a single mesh for the entire geometry?
Logged

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Re: Mesh Alignment
« Reply #8 on: May 17, 2011, 10:10:36 am »

The above problem still persists ...

meanwhile, I am moving from a coarser mesh to a moderate one:

A cell size of 0.16 and  36 cells gives a mesh boundary of 5.76 while my room boundary is 5.83 ... mesh is 0.07 short of actual room boundary.

what best can I do in this situation such that 2^l 3^m 5^n strategy is still met and number of cells is around 36?

 
Logged

Charlie Thornton

  • Thunderhead
  • *****
  • Posts: 851
    • View Profile
Re: Mesh Alignment
« Reply #9 on: May 17, 2011, 02:01:24 pm »

I'm told that the penalty for violating the 2^1 3^m 5^n cell count constraint is not that bad. I think it increases memory requirements a little bit or something along those lines. If it makes your life easier to add/remove a cell, I'd suggest giving it a try.

As for the access violation, I have no idea. I asked around the office and somebody said they've seen that happen when you have too many cells in the model and the program runs out of memory. If you have enough cells that the 1M cells = 1GB RAM rule of thumb is suggesting you're out of RAM, you may want to try it with fewer cells.

If that's not the case, I'd start removing meshes and see if you still get the problem with less going on. The only way to actually diagnose these vague access violations is to trim down a model until you can change just one thing to make it crash or not crash. After it's in that form, we can send it to NIST and they'll try to fix the bug in the next version. You'll also know what to avoid.

Logged

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Re: Mesh Alignment
« Reply #10 on: May 18, 2011, 08:52:24 am »

Thanks, I added a vent and the access violation just disappeared..
Logged

timscorbett

  • New Member
  • *
  • Posts: 8
    • View Profile
Re: Mesh Alignment
« Reply #11 on: May 19, 2011, 03:10:29 pm »

I have everything setup, but obstruction1 does not get ignited. If I place another obstruction2 far off isolated with no fire (vent),  obstruction1 gets ignited (wierd).

If vent(fire)  XY size is greater than the grid cell size, it gives "vent not attached to obstruction" ...

the vent (fire) is right on top of the obstruction, i.e if obstruction surface is at z= 0.8396, vent(fire) also is placed at z= 0.8396

under what circumstances (assuming thermal properties, fire properties are appropriately set) cannot the object get ignited?

Thanks
Logged

Charlie Thornton

  • Thunderhead
  • *****
  • Posts: 851
    • View Profile
Re: Mesh Alignment
« Reply #12 on: May 26, 2011, 07:52:42 am »

I don't know what is causing your trouble. Could you post the model or email it to support@thunderheadeng.com?
Logged