File size: 1,047 Bytes
c176aea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from torch import nn,tensor
import numpy as np
import seaborn as sns
class PINNd_p(nn.Module):
    """ $d \mapsto P$

    
    """
    def __init__(self):
        super(PINNd_p,self).__init__()
        weights = tensor([60.,0.5])
        self.weights = nn.Parameter(weights)
    def forward(self,x):
        
        c,b = self.weights
        x1 = (x[0]/(c*x[1]))**0.5
        return x1
    
class PINNhd_ma(nn.Module):
    """ $h,d \mapsto m_a $

    
    """
    def __init__(self):
        super(PINNhd_ma,self).__init__()
        weights = tensor([0.01])
        self.weights = nn.Parameter(weights)
    def forward(self,x):
        c, = self.weights
        x1 = c*x[0]*x[1]
        return x1
    
class PINNT_ma(nn.Module):
    """$ m_a, U \mapsto T$

   
    """
    def __init__(self):
        super(PINNT_ma,self).__init__()
        weights = tensor([0.01])
        self.weights = nn.Parameter(weights)
    def forward(self,x):
        c, = self.weights
        x1 = c*x[0]*x[1]**0.5
        return x1