-
Notifications
You must be signed in to change notification settings - Fork 36
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
Postprocess extraction of gradients at boundaries #78
Comments
Hi, thanks for your interest in the package! Just to avoid misunderstandings:
|
Thanks for the reply!
As I am attempting to integrate VoronoiFVM.jl into my current code, each PDE is defined and solved seperately, i.e. a seperate VoronoiFVM.System is created and solved for each. |
Sorry for coming back late: If you have For that PDE you can define a boundary_neumann!(f, p, bnode; species = 1, region = 4, |
Thank you! I believe this is the same domain as the one given here?https://github.com/j-fu/VoronoiFVM.jl/blob/faba3b6edbaf9d090feb3df60a06f2a4a14d5aaf/examples/Example203_CoordinateSystems.jl#L151C20-L151C20 |
Yes, this seems to fit. |
Further to this, is there a way to refer to the index of the boundary values of T? |
Sorry, I lost a bit the plot... If it hasn't been solved yet: I am not sure if I properly understand your question. If it is about the index of a boundary node in the grid, you can use bnode.index in oder to address a value in a global array. Otherwise: can you be a bit more spevfic ? |
No problem at all. Yes I use bnode.index to refer to boundary nodes in any VoronoiFVM function that loop over bnode, but once I solve the PDE for T, I have several custom functions that depend on the value of T at the western boundary. I have found a workaround that seems to suffice:
which gives On another note, do you have any examples of how VoronoiFVM treats spatially varying transport coefficients? |
No really good examples for this (note to self...). What is the characteristics of the spatial variation ? Different constant values in different subdomains or relatively smooth variation ? |
Thanks for your prompt reply. I have tried averaging the diffusion coefficient as such:
for spatially-varying diffusion coefficients, and have similar formulations for spatially varying reaction rate constants for my reaction terms. I was wondering if you had any examples of these. |
No, and in fact it would be good to have an example. |
Hi,
I have a 2.5D (cylindrical axisymmetric) domain, over which I solve Laplace's equation for heat transfer. I have obtained the temperature gradient by doing:
∇T = nodeflux(sys, T)
, which returns a matrix with the same dimensions as T.I would like to obtain the temperature gradient on the West boundary, but am unsure what indexing yields this. I have surmised that
grid[BFaceNodes]
,grid[BFaceEdges]
orgrid[BEdgeNodes]
contain the indices of all boundary nodes.Further to this, once I have obtained
∇T_west
, would I be able to simply input this as a boundary condition to another PDE on the same domain? For example:boundary_neumann!(f, p, bnode; species = 1, region = 4, value = ∇T_west)
The text was updated successfully, but these errors were encountered: