# Solving unbounded problem by NeuralPDE

**URL:** https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169
**Category:** Modelling & Simulations
**Tags:** question
**Created:** [May 20, 2023, 7:07pm UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169 "2023-05-20T19:07:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Ethan\_Tran](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ethan_tran/32/49198_2.png) [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)
#### Post date: [May 20, 2023, 7:07pm UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169/1 "2023-05-20T19:07:17Z")

</div>

I would like to solve an unbounded problem in PDE format by NeuralPDE.  
The domains of the problem is x belong [0;inf) and y belong real number (R)  
please help me on how could I implement these domains in Julia and whether NeuralPDE could solve the unbounded PDE?

In the case if my boundary condition is x = A if x \<= 10 and x = 0 otherwise.  
How could I implement the boundary condition like this?  
Thank you for your time.

---

<div class="post-metadata">

### Author: ![Sevi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Sevi](https://discourse.julialang.org/u/Sevi)
#### Post date: [May 21, 2023, 8:32am UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169/2 "2023-05-21T08:32:21Z")

</div>

What have you tried so far?

I don’t know if/how NeuralPDE can handle this, but it is possible to define open intervals in `DomainSets`/`ModelingToolkit` with `Inf` as the boundary:

```julia
Interval(0, Inf)
Interval(-Inf, Inf)

```

Another option might be to transform the variables first by some nonlinear transformation that maps the infinite domain to a finite one, e.g. some sigmoidal function (it will probably depend a lot on the actual problem/equations).

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [May 21, 2023, 3:02pm UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169/3 "2023-05-21T15:02:42Z")

</div>

Try doing transformations similar to:

[https://docs.sciml.ai/Integrals/stable/tutorials/numerical\_integrals/#Infinity-handling](https://docs.sciml.ai/Integrals/stable/tutorials/numerical_integrals/#Infinity-handling)

---

<div class="post-metadata">

### Author: ![Ethan\_Tran](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ethan_tran/32/49198_2.png) [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)
#### Post date: [May 21, 2023, 5:12pm UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169/4 "2023-05-21T17:12:42Z")

</div>

Thank you for your information. Your information is helpful to me for the unbounded PDE.  
I also had another questions, if the boundary condition in my problem following:  
x = A, if x \<= 10  
x = B, otherwise.  
Did you have any experiences to implement it on Neural PDE?

---

<div class="post-metadata">

### Author: ![Ethan\_Tran](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ethan_tran/32/49198_2.png) [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)
#### Post date: [May 21, 2023, 5:12pm UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169/5 "2023-05-21T17:12:51Z")

</div>

Thank you for your information.  
I also had another questions, if the boundary condition in my problem following:  
x = A, if x \<= 10  
x = B, otherwise.  
Did you have any experiences to implement it on Neural PDE?

---

<div class="post-metadata">

### Author: ![Sevi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Sevi](https://discourse.julialang.org/u/Sevi)
#### Post date: [May 21, 2023, 6:10pm UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169/6 "2023-05-21T18:10:11Z")

</div>

I don’t quite understand.

> [@Ethan\_Tran](#):
>
> x = A, if x \<= 10  
> x = B, otherwise.

These are not boundary conditions of a PDE as far as I can tell. What is the state variable? (some function `f(x,y)` ? )

Boundary conditions are usually conditions on the state variable or its derivative at the boundaries of the system. Something like `f(x=0, y) = ...` or `(df/dx)(x=0, y) = ...`

---

<div class="post-metadata">

### Author: ![Ethan\_Tran](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ethan_tran/32/49198_2.png) [@Ethan\_Tran](https://discourse.julialang.org/u/Ethan_Tran)
#### Post date: [May 21, 2023, 6:36pm UTC](https://discourse.julialang.org/t/solving-unbounded-problem-by-neuralpde/99169/7 "2023-05-21T18:36:45Z")

</div>

I am sorry for unclear question.  
the PDE of f(t, x, y) for t belong (0,T), x belong (0;inf), y belong (-inf, inf)  
the boundary is that:  
f(T, x, y) = A (constant) if x \<= 10  
f(T, x, y) = B (constant) if x \> 10
