Replies: 1 comment
-
For anyone who finds this later -- looks like the implementation above doesn't make a lot of sense since tensorflow needs to be able to back-propagate the gradients of this thing. Also, the ellipse cross section is invertible anyways (it just looks complicated) and I was able to implement the hard boundary conditions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
My impression is that complex geometries are usually not implemented with a hard boundary condition. However, I am not sure why this should be impossible, so I am looking at implementing hard boundary constraints for a 2D PDE solve on a toroidal cross section, which can be parametrized by an angle$\theta$ and a set of constants $\epsilon$ , $\delta$ , $\kappa$ , such that:
$x = 1 + \epsilon cos(\theta + arcsin(\delta) sin(\theta))$
$y = \epsilon \kappa sin(\theta)$
The idea now is to use the normal apply_output_transform() function and simply use a function F(x) such that F(x) = 0 on the cross sectional boundary and F(x) = 1 otherwise.
The relevant code is:
where the strictly inside function is defined through:
Here self.x_ellipse is the parametrized cross section shape.
The code seems to run without error:
but the boundary loss term appears nonzero, so I appear to be missing something. I would provide a full working example but there is significant code behind the scenes for the new geometry.
Beta Was this translation helpful? Give feedback.
All reactions