Skip to content
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

Merged
merged 39 commits into from Apr 30, 2021
Merged

Workbench bugfix cavity #110

merged 39 commits into from Apr 30, 2021

Conversation

patrickscholz
Copy link
Contributor

  • 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
@@ -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
Copy link
Collaborator

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?

Copy link
Contributor Author

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

exit_flag=0
count_iter=0
allocate(elemreducelvl(elem2d),elemfixlvl(elem2d))
allocate(numelemtonode(nl,nod2D),idxelemtonode(nl,nod2D))
Copy link
Collaborator

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!

Copy link
Contributor Author

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))
Copy link
Collaborator

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

Copy link
Contributor Author

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

@dsidoren dsidoren merged commit f744f15 into master Apr 30, 2021
wiltonloch pushed a commit to wiltonloch/fesom2 that referenced this pull request Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants