|
[Sponsors] |
conjugateHeatFoam, grid spacing and gradient calculation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 4, 2010, 15:15 |
conjugateHeatFoam, grid spacing and gradient calculation
|
#1 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
Hi all, I'm using the conjugateHeatFoam solver in 1.5-dev.
Part of my model requires that I calculate the gradient of a field. I noticed that one of my gradient values (close to the interface between two regions), is giving me something a little odd, and so I began to investigate. It appears to me that the conjuagteHeatFoam solver changes the grid spacing close to an interface for each submesh and I think this results in the wrong calculation of the gradient of a non-coupled field on the submesh. For example, in my test case, I have 3 regions each 0.3m in length (this is a 1D problem) split into 50 nodes each. So, the node-node grid spacing should be 0.3/50 = 0.006 and then the boundary to node grid spacing should be 0.3/50/2 = 0.003. BUT, when I do an Info << mesh.deltaCoeffs() << endl; on each mesh I do find that the node-node spacing is 0.006 but the boundary to node grid spacing gives an unexpected result on my submeshes. For the submeshes, I get the following (unexpected) boundary output from mesh.deltaCoeffs(): For my first submesh: Code:
leftWall { type calculated; value uniform 333.333; } rightWall { type calculated; value uniform 166.667; } frontAndBack { type empty; } Code:
leftWall { type calculated; value uniform 166.667; } rightWall { type calculated; value uniform 333.333; } frontAndBack { type empty; } Code:
leftWall { type calculated; value uniform 333.333; } rightWall { type calculated; value uniform 333.333; } frontAndBack { type empty; } |
|
May 5, 2010, 17:06 |
|
#2 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
I was able to fix this. In the [at|de]tachPatches.H files, all meshes must be included not just the main mesh.
I believe that these files included in the conjugateHeatFoam solver example are wrong because they only consider the main mesh, not the submeshes. For the majority of cases, it won't make a difference to the solution unless you plan to evaluate the gradient (or use the grid spacing close to the boundary) of a non coupled field on a submesh. |
|
|
|