-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workbench bugfix cavity #110
Conversation
patrickscholz
commented
Apr 21, 2021
- Solved the discrepancy between the area of the upper scalar prism edge and the area of the scalar volume (areasvol) its self. If there is no cavity area is equal areasvol but with cavity area and areasvol can be different. For this reason in the code had to be made clear where and when we use the area of the scalar volume and when we use the area of the upper scalar prism edge.
- improved mesh partitioning when using cavity, to guarantee that the cavity geometry is converging when kicking out isolated prisms within the cavity.
…rence between the mid-scalar cell area and area of the upper scalar cell edge. In case on no cavity both are identical but with cavity they are different from each other. Since below the cavity, the scalar cell area is defined by the area of the lower edge of the scalar control volume
…ge of the scalar prism. If there is no cavity these two areas are identical but in presence of cavity they can be different
…sergey --> leads to rigid lid approximation under the cavity --> no moving surface possible
…s fully converge
Conflicts: src/fvom_init.F90
…nz ,n)/areasvol(nz,n)
@@ -18,7 +18,7 @@ MODULE MOD_MESH | |||
|
|||
TYPE T_MESH | |||
integer :: nod2D ! the number of 2D nodes | |||
real(kind=WP) :: ocean_area | |||
real(kind=WP) :: ocean_area, ocean_areawithcav |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickscholz
is ocean_areawithcav needed? can ocean_area and areasvol be used instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case of no cavity ocean_area ==ocean_areawithcav
but in case of cavity: we do restoring only over the surface ocean part, where there is no cavity (ocean_area) but the balancing of the freshwater we do over the entire surface of the ocean including also the cavity surface
src/fvom_init.F90
Outdated
exit_flag=0 | ||
count_iter=0 | ||
allocate(elemreducelvl(elem2d),elemfixlvl(elem2d)) | ||
allocate(numelemtonode(nl,nod2D),idxelemtonode(nl,nod2D)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickscholz @koldunovn such allocation won't survive on big meshes (for 30Mio mesh one the allocation of (nl, node) will be >10Gb).
need to ensure that this allocation is OFF per default (no cavity). otherwise the partitioning won't work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can convert elemreducelvl(elem2d) and elemfixlvl(elem2d) to logical array should save some memory
and
I can convert the code so that i only need numelemtonode(nl),idxelemtonode(nl)) which should save a lot. But anyway the model will only step into this part when cavity is used
src/oce_mesh.F90
Outdated
@@ -1283,6 +1295,30 @@ subroutine find_levels_cavity(mesh) | |||
end if | |||
end do | |||
|
|||
|
|||
!___________________________________________________________________________ | |||
allocate(numelemtonode(mesh%nl,myDim_nod2d+eDim_nod2D)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickscholz
could not find the deallocation statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can also reduce array size here to numelemtonode(mesh%nl) and put deallocation statement
… ensuring uice,vice == 0 boundary condition along the cavity edge
…, should reduce memory demand for large meshes
…_cavity and ensure deallocation
Workbench bugfix cavity