Giter Site home page Giter Site logo

ifem-darcy's People

Contributors

akva2 avatar kmokstad avatar thebb avatar vikingscientist avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ifem-darcy's Issues

Memory issue in Darcy-object

It seems like the Darcy-object remembers something from the last run, which affects the outcome of the next run.
If I run the following code
image
I get the following plot
image
and if I change p1 from p1=np.linspace(0, 4, 10) to p1=np.linspace(-4, 4, 10) the plot becomes
image
i.e. the QoI values do not change, even though the pressure values are changed.
However if I run the following code, where I make a new Darcy-object for each loop
image
I get the following plot
image
If I again change p1 from p1=np.linspace(0, 4, 10) to p1=np.linspace(-4, 4, 10) the plot becomes
image
Here we can see that the two plots agree in the area where the pressure is equal (i.e. p $\in$ [0,4]).

The XML-file used:
image

Code used to make geometry:
image

Secondary solution (grad u) is not computed correctly

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>                        
<simulation>                                                                   
  <!-- General - geometry definitions !-->                                     
  <geometry dim="3">                                                           
    <patchfile>PipeFlow3D.g2</patchfile>                                       
    <raiseorder patch="1" u="0" v="0" w="1"/>                                  
    <refine patch="1" u="3" v="3" w="7"/>                                      
    <topologysets>                                                             
      <set name="Inflow" type="face">                                          
        <item patch="1">5</item>                                               
      </set>                                                                   
      <set name="Outflow" type="face">                                         
        <item patch="1">6</item>                                               
      </set>                                                                   
    </topologysets>                                                            
  </geometry>                                                                  
                                                                               
  <!-- General - boundary conditions !-->                                      
  <boundaryconditions>                                                         
    <dirichlet set="Inflow"  comp="1" type="constant"> 3 </dirichlet>          
    <dirichlet set="Outflow" comp="1" type="constant"> 0 </dirichlet>          
  </boundaryconditions>                                                        
                                                                               
  <!-- Problem-specific block !-->                                             
  <darcy>                                                                      
    <permvalues>1|1|1</permvalues>                                             
    <bodyforce>0|0|0</bodyforce>                                               
    <source>0</source>                                                         
  </darcy>                                                                     
                                                                               
  <postprocessing>                                                             
    <vtfformat nviz="2">ascii</vtfformat>                                      
  </postprocessing>                                                            
                                                                               
</simulation>                                                                  

Where PipeFlow3D.g2 is a straight cylinder:

700 1 0 0                                                                      
3 1                                                                            
3 3                                                                            
0.000000 0.000000 0.000000 1.000000 1.000000 1.000000                          
3 3                                                                            
0.000000 0.000000 0.000000 1.000000 1.000000 1.000000                          
2 2                                                                            
0.000000 0.000000 1.000000 1.000000                                            
-0.000000 -1.414214 1.414214 1.000000                                          
0.000000 -2.000000 0.000000 0.707107                                           
0.000000 -1.414214 -1.414214 1.000000                                          
-0.000000 0.000000 2.000000 0.707107                                           
0.000000 0.000000 0.000000 1.000000                                            
0.000000 0.000000 -2.000000 0.707107                                           
-0.000000 1.414214 1.414214 1.000000                                           
0.000000 2.000000 0.000000 0.707107                                            
0.000000 1.414214 -1.414214 1.000000                                           
18.000000 -1.414214 1.414214 1.000000                                          
12.727922 -2.000000 0.000000 0.707107                                          
18.000000 -1.414214 -1.414214 1.000000                                         
12.727922 0.000000 2.000000 0.707107                                           
18.000000 0.000000 0.000000 1.000000                                           
12.727922 0.000000 -2.000000 0.707107                                          
18.000000 1.414214 1.414214 1.000000                                           
12.727922 2.000000 0.000000 0.707107                                           
18.000000 1.414214 -1.414214 1.000000                                          

The pressure should form a linear drop from left to right with a gradient that is constant [a,0,0] for some value a. Instead, this is what I get:

pipebug

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.