Comments (3)
That would be due to structural_simplify
simplifying away points due to the specified Neumann BCs, please use sol[u]
to retrieve all points including those that were simplified out.
from methodoflines.jl.
thanks for the hint. This does not seem to work:
using ModelingToolkit, MethodOfLines, OrdinaryDiffEq, DomainSets
@parameters x t
@variables u(..)
Dt = Differential(t)
Dx = Differential(x)
Dxx = Differential(x)^2
∇²(u) = Dxx(u)
x_min = 0.0
x_max = 1.0
t_min = 0.0
t_max = 11.5
α = 10.
eq = [Dt(u(x,t)) ~ α*∇²(u(x,t))]
domains = [x ∈ Interval(x_min, x_max),
t ∈ Interval(t_min, t_max)]
bcs = [u(x,0) ~ 20,
Dx(u(0,t)) ~ 0,
Dx(u(x_max,t)) ~ 0]
@named pdesys = PDESystem(eq,bcs,domains,[x,t],[u(x,t)])
N = 5
dx = 1/N
order = 2
discretization = MOLFiniteDifference([x=>dx], t, approx_order=order, grid_align=center_align)
# despite N = 5, prob only has 4 states.
prob = discretize(pdesys,discretization)
sol = solve(prob, TRBDF2(), saveat=1)
# ERROR: ArgumentError: u⋆ is either an observed nor a state variable.
sol[u]
@variables u(x,t)
# ERROR: ArgumentError: u(x, t) is either an observed nor a state variable.
sol[u]
from methodoflines.jl.
@YingboMa I'm sure that this should work, we're doing it throughout the tests. All state/observed variables look like u[i](t)
. What is going wrong here?
from methodoflines.jl.
Related Issues (20)
- How to check the full(DerivativeOperators) in MethodOfLines
- BoundsError in Discretizing Interface Domains with Different Point Counts
- type PDESystem has no field analytic HOT 1
- Docs for solving the heat equation: extract solution HOT 5
- ArgumentError: Differential w.r.t. multiple variables Any[t, ...] are not allowed. HOT 2
- Interpolate grid values for staggered grid discretization
- Symbolic tracing in staggered grid can return Nans
- UndefVarError: `issymbollike` not defined HOT 3
- Move to using SymbolicUtils chains
- Package installation error HOT 1
- `discretize` errrors when a subset of equations have no time derivatives HOT 5
- Equation + State mismatch dependent on grid spacing
- MethodOfLines down-versions ModelingToolkit HOT 1
- Error with test/pde_systems/MOL_1D_Interface_Nonlinear.jl
- MOL & BoundaryConditions HOT 3
- PDAE example HOT 5
- PDESystem & arguments
- "ExtraVariablesSystemException: The system is unbalanced" Error while solving a PDE! HOT 4
- System of PDEs Initial Failure warning and MethodError HOT 1
- System of PDEs `solve` error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from methodoflines.jl.