Skip to content

Periodic IC #893

Answered by athtareq
ehsanngh asked this question in Q&A
Sep 6, 2022 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Hello, this is an example I did for $ u_t $ + $ \nabla u $ = $ f $ and $ u(0)=u(1) $

It's also two space variables and one time variable, and the solution is time-periodic

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import numpy as np
import tensorflow as tf

import deepxde as dde

import tensorflow_addons as tfa

from tensorflow_addons import activations


from matplotlib import pyplot


def func(x,y,t):
    return 2*np.pi*(x+y)*tf.cos(2.0*np.pi*t)
def pde (x , y) :
    grad_y = tf . gradients (y , x ) [0]
    dy_x , dy_y , dy_t = grad_y [: , 0:1] , grad_y [: , 1:2],grad_y [: , 2:]
    dy_xx = tf . gradients ( dy_x , x ) […

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@ehsanngh
Comment options

Comment options

You must be logged in to vote
1 reply
@ehsanngh
Comment options

Answer selected by ehsanngh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants