instruction stringlengths 43 28.1k |
|---|
The most computationally intensive part of my application is the triangularisation of a matrix, $\mathbf{S} = \operatorname{triag}\left(\mathbf{A}\right)$, such that $\mathbf{S}\mathbf{S}^T = \mathbf{A} \mathbf{A}^T$.
For this application $\mathbf{A} \in \Re^{n \times 2(n+v)}$, where $n$ is generally close to the same ... |
I have a ~4.12 Tb structured relatively-sparse matrix dataset (about 8% of the matrix entries are non-zero) that i want to apply an LU decomposition, however, given the size of it, loading it in memory and using the usual BLAS or Eigen routines is out of the question.
Is there some unix/linux library that i can use to ... |
Suppose I have a fixed point iteration of the form
$$x_{n+1}=f(x_n).$$
Suppose further that after some initial testing, I found that it does not converge to an a priori known fixed point $x^*$. I recall from optimization class that often when the standard newton's method does not converge, one can implement a global ... |
When solving a FV formulation of a set of equations, a code I am currently working with has user defined normalization factors for scaling equations. It normalizes time, number densities, potential, and fluxes, each with a different factor.
I have the impression that these are a legacy attempt at a rough diagonal pr... |
I recently started to study non-parametric clustering methods and I come across to CRP. After reading all the material I found on the web there is one thing which is not completely clear to me: which is the aim of this process? You can't cluster according to 'distance' (and in fact it was invented another method called... |
I'm about to start working on a software library of numerical ODE solvers, and I'm struggling with how to formulate tests for the solver implementations. My ambition is that the library, eventually, will include solvers for both nonstiff and stiff problems, and at least one implicit solver (more or less on par with the... |
While reading some literature on PDE solvers I came across the term pseudo time-stepping today. It seems to be a common term, however I failed to find a good definition or an introductionary article for it.
Hence: What is pseudo time-stepping, and how is it usually used?
|
What is the theoretical convergence rate for an FFT Poison solver?
I am solving a Poisson equation:
$$\nabla^2 V_H(x, y, z) = -4\pi n(x, y, z)$$
with
$$n(x, y, z) = {3\over\pi} ((x-1)^2 + (y-1)^2 + (z-1)^2 - 1)$$
on the domain $[0, 2] \times [0, 2] \times [0, 2]$ with periodic boundary condition. This charge density is... |
I am currently working on my bachelor thesis, where I am calculating trajectory of electrons and ions in Hall Effect Ion Thruster. However, to be sure what I am calculating, I need to know how does the electromagnetic field look like.
I already have working code for visualization of electromagnetic field using streamsl... |
Recently, I've been pushing my group to include more testing when writing their code. There were several major bugs that took a lot longer to catch than probably speaking was necessary, because we didn't have a good testing regime in place.
However, I suspect that having the appropriate tools to automate (or to help st... |
Is there any application for PDEs with nonlinear Dirichlet boundary conditions? That is, I am looking for an example of a partial differential equation for a state $u$ posed on a domain $\Omega$ with $g(u|_{\Gamma})=0$, where $\Gamma$ is the boundary of $\Omega$ and $g\in L^2(\Gamma)\to L^2(\Gamma)$ is a nonlinear func... |
I am given the advection equation
$$
u_t=u_x
$$
and then the transformation of coordinates
$$
x=x(\xi,\theta), \qquad t=\theta
$$
which leads us to the transformed equation
$$
x_{\xi} u_{\theta} - u_{\xi} x_{\theta} = u_{\xi}
$$
Further, i have to derive the central difference approximation for $u_x$ (at point $x_i$).... |
I'd like to loop over all edges of a simplex (in a mesh). To this end: How can I extract the the points from a cell?
This is for the eval method of a C++ definition of an Expression, i.e.,
void eval(Array<double>& v,
const Array<double>& x, ... |
I am about to start my journey into the world of CFD and wanted to start with the Fractional-step method for solving the incompressible Navier-Stokes equations. Could you perhaps suggest some articles or books I should look into (for this method specifically)?
|
I am using the Chebyshev spectral differentiation technique that is described concisely under "details" here. The idea is to take the initial data $v_0,v_1\,...,v_N$ and store it in union with itself as the vector $$V = [v_0\,v_1\,...\,v_{N-1}\,v_N\,v_{N-1}\,v_{N-2}\,...\,v_1]^\top$$
From there, the Fourier transform ... |
Given a vector-valued PDE, I'd like to enforce the boundary conditions
$$
\vec{n}\cdot u = g\\
\vec{n}\cdot \nabla (\vec{t}\cdot u) = 0
$$
on the solution $\vec{u}$. If the boundary happens to align with one of the coordinate axes, I could use
bcs = DirichletBC(V.sub(0), g, 'on_boundary')
as Dirichlet condition. What ... |
I am planning to model the laminar flow reactor shown in the picture below using computational fluid dynamics (CFD). The laminar flow reactor is used to study a multiphase flow: a layer of sheath air that cushions a stream of aerosols.
Currently, I am in the process of narrowing down the software to be used. In my (li... |
I'm applying finite-difference method to a system of 3 coupled equations. Two of the equations are not coupled, however the third equation couples to both the other two. I noticed that by changing the order of equations, say from $(x, y, z)$ to $(x, z, y)$ that the coefficient matrix becomes symmetric.
Is there any adv... |
Given a Dolfin Function u on a mesh, I'd like to check if it is greater than 0 throughout the mesh. I noticed that the expression
u > 0
is an object of the type
GT(Coefficient(FiniteElement('Lagrange', Domain(Cell('triangle', 2), 'triangle_multiverse', 2, 2), 2, None), 0), Zero((), (), {}))
How can I evaluate that th... |
I am trying to get an interpolation function $f$ (in 3D) at all vertices of cells. I extract all vertices of cells and then I assign the value to each vertex: if it's in a sphere of radius $R$, then I assign the value, say 3.91. If it's outside the sphere, then I assign the value 0. I got it running without the error m... |
I am trying to calculate a 3D Function f on a large set of points, say a uniform cubic grid. Besides, the cubic grid points do not coincide with the mesh vertices where the Function f is defined. For example:
from dolfin import *
mesh1 = Mesh( meshfile) # A uniform mesh
V1 = FunctionSpace(mesh1, 'CG', 1)
f1 = Function(... |
I'm currently learning the maximal margin classifier with kernels, and I'm wondering - why do they work? In which cases do they work best?
I'm especially interested in the RBF and polynomial kernels, but not only.
|
I've been trying to find some resources that would help me figure out how to numerically solve a coupled system of ODEs which is also an eigenvalue problem.
The system is something like:
$ \tag{1} \kappa h_2(r) +\kappa r h'_2(r)+ (1+\kappa) W_3(r) + (1+ \kappa)
r W'_3(r)+ (1 + \kappa) r^2 W''_3(r) = 0 $
$ \tag{2... |
Given a vector-valued Dolfin function u from the function space V*V with V=FunctionSpace(mesh, 'CG', 2), how do I extract
$$
\max_{x\in\Omega} \|u(x)\|
$$
? An approximation works, too.
|
I have a job already submitted to a TORQUE queue. The system I submitted it on has several queues, and I want to change which queue I'm running it in. I found this question, which recommends the use of qalter, but qalter's man page doesn't have instructions for changing the queue.
EDIT:
I tried qalter -q <queuename> <j... |
I'm using the Crank-Nicolson finite difference scheme to solve a 1D heat equation. I'm wondering if the maximum/minimum principle of the heat equation (i.e. that the maximum/minimum occurs at the initial condition or on the boundaries) also holds for the discretized solution.
This is probably implied by the fact that ... |
I solved the steady state dynamic linear elastic model in a solid. My equation is a function of frequency and the strong form is:
$$\operatorname{div}(\operatorname{stress}(\vec x, w)) + w^2 \rho u( \vec x,w)=0$$
where $\rho$ is the density.
The BC is
$$ \sigma(\vec x,w) \cdot n(x)=T(x,w), \qquad u(x,w)=U_0$$
The ... |
Given a real-rectangular matrix $S$ and inorder to solve this simple quadratic programming problem:
Minimize $w'S'Sw = ||S w||^2$ over $w$ subject to
$e^Tw = 1$ and $w \geq 0$
using a solver I want a re-parametrization of the problem to the form:
$\min(-d^T b + 1/2 b^T D b)$ with the constraints
$A^T b \geq b_0$
so tha... |
Von Newman stability analysis for acoustic wave equation explicit centered differences: 2nd order time and space (N 2)'th order:
\begin{eqnarray}
U_{jk}^{n+1} = \left( \frac{\Delta t V_{jk} }{\Delta s} \right) ^2 \left( \sum_{a=-N}^N w_a U_{j+a k}^n + \sum_{a=-N}^N w_a U_{j k+a}^n \right) + 2 U_{jk}^{n} - U_{jk}^{n... |
I have a cost function: $f(x,y,z) \rightarrow \mathbb{R}$
it is very expensive to evaluate
$x,y,z \in \mathbb{Z}$
0 < x < 10
0 < y < 30
0 < z < 100
I thought it was convex, not sure now based on @Brian's commentary.
$f$ can only be evaluated at integers ( I pondered trying to evaluate at real's but it would be fairly ... |
Are stabilization techniques for convection-dominated flows like SUPG+PSPG, interior penalty methods, etc. able to handle turbulent flows without tubulence model being employed, at least up to some Reynolds numbers? Conversely is stabilization needed for turbulent flow being resolved by some RANS model when Reynolds nu... |
I want to save a matlab source code into a string format in matlab. Does anyone know how to do this? For example,
type xxx.m
can display the source code of xxx.m. Then using what command am I able to save it into a string?
|
Having
mesh = UnitSquareMesh(2, 2)
Q = FunctionSpace(mesh, 'DG', 0)
this works as expected
R = mesh.ufl_cell().circumradius
R = project(R, Q)
but this fails
h = mesh.ufl_cell().max_facet_edge_length
h = project(h, Q)
when compiling generated code with error: 'facet_area' was not declared...
Does max_facet_edge_lengt... |
I have been given the task of implementing SVD using the Lanczos method.
As I understand it only helps to find eigenvalues using a sequence of tridiagonal matrices, but i don't know how to apply this to actually computing the SVD.
Do I need to approximate the given matrix with tridiagonal and then compute SVD with diff... |
We are working on an optimization problem in which we can approximate the eigenvalue calculation by assuming a constant eigenvector, using the formula:
$$
\tilde{\lambda}=\frac{\{\phi_0\}^T[K]\{\phi_0\}}{\{\phi_0\}^T[K_{G_0}]\{\phi_0\}}
$$
where $\{\phi_0\}$ is the already calculated eigenvector, $[K_{G_0}]$ is the alr... |
Neumann boundary conditions are implemented by introducing ghost points outside the domain and then using the boundary conditions to eliminate the ghost points. For example, see this question.
I have a set of three equations in variables $(u,v,w)$ which are one dimensional functions of $x$, and I cannot see how to eli... |
My heat equation is
$$
\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2}, \quad x \in [0,1], \quad t \in (0,0.1]
$$
with initial condition $u(x,0)=\sin(\pi x)$ and homogeneous Dirichlet boundary conditions $u(0,t) = u(1,t) = 0$. The exact solution is $u(x,t) = e^{-\pi^2t}\sin(\pi x)$. I approximate the... |
I am trying to model a flow past a cylinder using the projection method. I am a bit confused on how to define the circular cylinder in my computational domain.
I know that the cylinder has the coordinates $(x-a)^2 + (y-b)^2 = r^2$
but what is the best way to define that in terms of x(i,j), y(i,j) coordinates such that ... |
With the move away from launchpad I hope this is the right place for this question.
Is there a way to initialize the DOFs for a function? generated by
u = Function(V)
When I run a code which I will put in at the end I get the fenics error:
*** Error: Unable to initialize vector of degrees of freedom for fun... |
I am looking to port some code that resolves a set of partial differential equations (PDE) by the finite volume method in IMPLICIT form (for the time discretization).
As result there is a tridiagonal system of equations in x,y,z directions which is handled by the ADI/TDMA scheme.
I can not seem to find anything regardi... |
I would like to compute the decomposition of a real symmetric positive definite matrix $\mathbf{A} = \mathbf{UDU}^\top$.
LINPACK seems to have it as DSIFA, but I cannot find an equivalent routine in LAPACK. It also doesn't appear to implemented in Eigen.
What other packages and routines support this decomposition?
Ba... |
I need to solve a real generalized eigenvalue problem
$Ax= \lambda Bx(*)$
A and B are calculated from equations below:
$$A=\sum_{i,j=1}^{N}W_{ij}(K_{i}-K_{j})\beta\beta^{T}(K_{i}-K_{j})^{T}$$
$$B=\sum_{i=1}^{N}D_{ii}K_{i}\beta\beta^{T}K_{i}^{T}$$.
where $W$ is a real symmetric $N*N$ matrix with diagonal entries being $... |
I'm using Eigen (a C++ library for numerical linear algebra) to solve a linear equation with the the bi-conjugate gradient BICGSTAB algorithm with Incomplete LU preconditioner. However, the result bg.error()("estimated error") becomes -1.#IND after 1 iteration. The size of the linear system is $N=20000$. Could anyone h... |
I am trying to implementing a nodal discontinuous Galerkin spectral element method for linear and non-linear systems of equations. The solution at each time step is given at N nodes, which are located at the integration points for Legendre-Gauss/Legendre-Gauss-Lobatto quadrature.
For visualization purposes I would like... |
I'm working on a time integration scheme for my research. As a result, I have come across an interesting phenomenon. Somehow, the total energy of the scheme oscillates. At any given time the total energy of the system could be increasing or decreasing but does so in a oscillatory fashion. Interestingly enough, for what... |
I have a physical problem governed by the Poisson equation in two dimensions
$$
-\nabla^2 u = f(x,y), \; in \; \Omega
$$
I have measurements of the two gradient components $\partial{u}/\partial{x}$ and $\partial{u}/\partial{y}$ along some part of the boundary, $\Gamma_m$, so would like to impose
$$
\frac{\partial{u}}{... |
In my courses on numerical analysis, I have been taught that the main and principal motivation for preconditioning linear systems of equations is to increase the convergence rate of iterative solvers for that LSE.
But, is there any effect on the precision of the computed solution?
I can remember a result on the precisi... |
Which turbulence model is suitable for resolving incompressible buoyancy-driven flow of a fluid within an cylindrical ampoule?
I prefer turbulence model which is sufficiently simple so that fully coupled (UFL) variational form of Navier-Stokes-Fourier is changed in way that each added term
is treated by Newton solver,... |
I need a little help with Matlab code for the method mentioned in this paper for computing the inverse of the matrix.
In this paper, the author presented scaled Newton iteration given by $X_{k+1} = \alpha_{k+1}(2I - X_{k}A)X_{k}, k = 0, 1, 2, \ldots$ for a given matrix $A$.
Initial approximation $X_{0} = \alpha_{0}A^t... |
Long time ago I came across with a paper that covered early theoretical work (first half of 20th century) in the field of inverse problems. I remember there was a reference to a paper which proved that inverse problem can be solved uniquely for a spherical domain with infinitely many sources and very precise receivers ... |
Edit: I made a test model with 2 bodies. The sun and earth or w/e.
But I now have the problem of zero divisions every time that one of the coordinates is zero.
import numpy as np
from numpy import exp, sqrt, pi, linspace
from time import clock,time
import pylab as pylab
S1 = 1E3 #Mass Star
M1 = 1 ... |
The integral I need to evaluate is:
$$ \int_x^{\infty} \frac{t^n}{e^{t} -1} dt $$
After some research I found a paper saying,
The numerical values of the two integrals [...] are easily calculated either directly or through series expansion.
It's easy to evaluate, right? So I try plugging this into my 32bit 7.7.0.471 ... |
I read in a paper and also at wiki that we can solve the system
$$Ax=B$$
by Fast Fourier Transform, where $A$ is a circulant matrix. The solution is
$$x=\mathtt{ifft}(\mathtt{fft}(B)/\mathtt{fft}(a))$$
where $a$ is first column of $A$, ifft is the inverse of fft and $/$ denotes component-wise division. For example, th... |
I'm relatively new in the CFD modelling and I'm making a VOF model of a rectangular box ($l \times w \times h = 120\times 80 \times8$ m) with an inlet ($w\times h = 10\times 8$) at the long side.
The pressure outlet is the upper face of the box ($l\times w=120\times 80$m). The box is initially filled with $5$m water. ... |
I have probably a very stupid problem. I can't solve a simple Poiseuille flow in a straight 2-D channel driven by a pressure drop. Results are complete nonsense. (Setting zero pressure on the outflow gives trivial solution/no flow. Taking pressure on the outflow non-zero (but still having some pressure drop) gives a so... |
I am getting into computational fluid dynamics (CFD). One of my professors mentioned that a cylindrical wake would be a good starting point to learn about turbulence modelling when using CFD software. I'm not a native speaker, so I googled
cylindrical wake CFD
but the results confuse me (also the translations of my ... |
My question is basically the best way to compute the matrix exponential in parallel. I've got a sequential code written in Python (https://github.com/hadsed/AdiaQC) and I need to extend it to run in a high performance environment (cluster, supercomputer, maybe GPU).
The code simulates adiabatic quantum computation, and... |
I'm still pretty new in the CFD modelling world.
Can anyone advise me how to define a inlet for a tidal basin in Fluent?
The water level and the velocity at the inlet vary in time due to the tide cycle.
|
I'm trying to analyze the complexity of MATLAB code I wrote.
I'm trying to figure out how much (in terms of $O$ or $\Theta$) to give functions like find, matrix * operator, matrix .* operator, and others.
Is there a way to calculate this? Or a reference?
|
Suppose I had a boundary value problem:
$$\frac{d^2u}{dx^2} + \frac{dv}{dx}=f \text{ in } \Omega$$
$$\frac{du}{dx} +\frac{d^2v}{dx^2} =g \text{ in } \Omega$$
$$u=h \text{ in } \partial\Omega$$
My goal is to decompose the solution of this coupled problem into a sequence of uncoupled PDE's. To decouple the system, I'm ... |
When FEM-discretizing and solving a reaction-diffusion problem, e.g.,
$$
- \varepsilon \Delta u + u = 1 \text{ on } \Omega\\
u = 0 \text{ on } \partial\Omega
$$
with $0 < \varepsilon \ll 1$ (singular perturbation), the solution of the discrete problem will typically exhibit oscillatory layers close to the boundary. Wit... |
I'm interested in finite-difference approaches to the incompressible Navier-Stokes equations that can handle complex geometry without the use of an unstructured mesh or a non-Cartesian grid. To be clear, I'm aware of standard approaches, e.g. Chorin's projection method, to solving the Navier-Stokes equations on a recta... |
For the numerical integration of reaction terms in my PDE on a 2D triangular mesh, I would like to use the scheme
$$
\int_T \Phi(x) \approx \frac{|T|}{3} (\Phi(x_0) + \Phi(x_1) + \Phi(x_2))
$$
where the $x_i$ are the triangle nodes.
How to specify this when assembleing the system?
|
I am trying to simulate a metal-organic framework in LAMMPS using the UFF potential. It's working quite well for some structures where all molecules have an occupancy of 1.
However, when I have a solvent molecule that has an occupancy of 0.5, what I do is randomly select one of the two positions for each unit cell. T... |
The explicit 4th order discretization for the 2D scalar wave equation is given by:
\begin{eqnarray}
U_{jk}^{n+1} = \left( \frac{\Delta t V_{jk} }{\Delta s} \right) ^2 \left( \sum_{a=-N}^N w_a U_{j+a k}^n + \sum_{a=-N}^N w_a U_{j k+a}^n \right) + 2 U_{jk}^{n} - U_{jk}^{n-1} \nonumber \\
U_{jk}^{n+1} = \left( \fra... |
Motivation:
In isogeometric analysis, state variables(e.g. displacement) are defined in the parametric domain, which can be mapped to the physical domain by $\boldsymbol{\xi}\mapsto \boldsymbol{x}$ as shown beneath. However the quantity related to displacment such as stress, strain are spacial derivatives of displaceme... |
I am still a fairly new graduate student, and I am having trouble simulating a metal-organic framework. I am currently using UFF (I implemented it for LAMMPS), and it works well for some MOFs, but does not give empirically accurate results for others. What I mean by this is that I have a CIF file for the experimental... |
At work, I essentially function as an independent consultant. For management and customers, I need to estimate the amount of time it will take to develop software as part of my computational science research. However, my time estimates are usually off. I know that there are methods to estimate the time it takes to deve... |
In one of my PETSc programs, I need a processor to access values from another processor.
So in the PETSc FAQ's this issue has been briefly addressed here.
To create a local vector, I tried this
Vec local;
ierr = VecCreateSeq(PETSC_COMM_WORLD,10,&local);CHKERRQ(ierr);
where 10 is the size of the local vector I wish ... |
I am trying to understand the advection equation with variable velocity coefficient a bit better. In particular I don't understand how the equation can be conservative.
The advection equation,
$$
\frac{\partial u}{\partial t} + \frac{\partial}{\partial x}(\boldsymbol{v}u) = 0
$$
Let's interpret $u(x,t)$ as being the co... |
Note: this question was also posted in StackOverflow and math.stackexchange.
I have a set of 3D points defining a 3D contour, as shown below. The points in this contour lie in their best-fit plane and I want to obtain a 3D triangular mesh representation of the surface inside this contour.
Doing some research I found t... |
I'd like to program a trajectory planner, let's say for a robot, and I can pass acceleration commands to the robot, the robot can move in one dimension. The outcome of the planner is now a vector with accelerations, for example 10 accelerations, and since I set the accelerations with a frequency of 2, this will be suff... |
This title certainly needs some clarification: I need to compute parameters $a_i$ for a helper function $f(\vec{a};k)$ (for grid interpolation) which is fitted to a number of values $y_k$ which are subject to evolution dictated by a system of ODE's $d y_k/d t = F_k(t,\vec{y})$. The Levenberg-Marquardt fit of the values... |
When SUPG/PSPG stabilization is added to momentum equation of flow problem, is needed stabilization for energy equation also? I would guess that when stabilization for velocity works fine so one gets velocity without spurious wiggles and assuming that thermal diffusivity is large enough then answer is no. How are these... |
I'm trying to model a spring damper system from a tutorial that I've found on this site.
If I use the exact same parameters as the ones in the tutorial the system is not stable. I've downloaded the code and verified that the parameters were the same as mine.
a = (k * u) - (d * v);
v = v + a;
s = s + v;
jsfiddle availa... |
Following on from the earlier question I am trying to derive a finite-difference scheme for the advection equation which is conservative. It was suggested that for advection equation with variable velocity,
$$
\frac{\partial u}{\partial x} + \frac{\partial}{\partial x}\left( \boldsymbol{v}(x)u\right) = 0
$$
that the ch... |
I have obtained some data from neutron diffraction for some material samples. The "rawest" form of the data is the structure function $S(Q)$.
We can choose a variety of different Q-maxes when Fourier transforming the data into $g(r)$, along with applying something like a Lorch function to smooth it out. Right now the... |
I am continuing my dive into computational fluid dynamics. I would like to build a simple test case for modelling the flow around a cylinder in FEniCS and then continue to model turbulence in order to observe the Karman vortex street.
I am a newby in both FEniCS and CFD. I have started to go through the FEniCS book and... |
while executing my script i get this error
Traceback (most recent call last):
File "/media/oss/Fenics/demo/box_3delasticity.py", line 33, in
mesh = Box (0, 0, 0, 1, 1, 1, 1, 1, 1)
File "/usr/lib/python2.7/dist-packages/dolfin/cpp/mesh.py", line 8698, in init
_mesh.Box_swiginit(self,_mesh.new_Box(*args)
I d... |
I am doing a small project at school. I have done my code implementations in CUDA and did some performance measurements with real values, i.e. running the program with different number of threads, changing the size of the problem, changing both, etc.
The results of (time, speedup) look really nice. But then I was asked... |
My system is a symmetric FE problem with lagrange multipliers (e.g. incompressible Stokes' flow):
\begin{pmatrix}A & B^T \\ B & C\end{pmatrix}
where $C = 0$ is the typical case (I have even made sure that the equations are numbered so that the Lagrange multipliers appear last ). The system is quite large (+100k lines).... |
It seems that people usually use the Single Active Electron (SAE) approximation to deal with a multi-electron system, transforming the problem into a single electron problem. For example, in numerically solving the problem of a helium atom interact with laser fields, people usually approximate include the electron-elec... |
I just went through the Fenics book to get the nodal displacements and tried this code ....
u_nodal_values = U.vector()
u_array = u_nodal_values.array()
coor = mesh.coordinates()
center = (0.5,0.5,0.5)
print U(center)
if mesh.num_vertices()==len(u_array):
for i in range(mesh.num_vertices()):
print ’U(%8g,%8g... |
I am about to test my algorithms for solving optimal control problems of type:
Find an input $u$, such that for a time interval $(0,T]$ the cost functional
$$J(v,u) = \mathcal M(v(T)) + \int_0^T\mathcal K(v(t),u(t)) dt, $$
becomes minimal, where $v$ is the velocity of flow modelled by the incompressible Navier-Stokes ... |
This is not a technical question, and is asked just out of curiosity.
Are computational fluid dynamics (CFD) simulations used in animation movies? (something like shallow water equations, explosion problem etc.)
In other words, can computational simulations of real world problems be used in art?
(I have tagged the qu... |
Sunny day today, isn't it? Please, I need help with my problem. I have written a program to do 2D ray tomography, according to this paper.
For the result, I use formula (4.15) from the paper. Now I need to do SVD regularization on the result, in order to get good results for lower count of rays (lets say I will have $N... |
In a elastodynamics problem, I define the stress as
def sigma(v):
return 2.0*mu*sym(grad(v)) + lmbda*tr(sym(grad(v)))*Identity(v.cell().d)
I have computed the displacements at the nodes. Now I want to compute the stresses elementwise. Can anyone help?
|
In practice, the runtime of numerically solving an IVP
$$
\dot{x}(t) = f(t, x(t)) \quad \text{ for } t \in [t_0, t_1]
$$
$$
x(t_0) = x_0
$$
is often dominated by the duration of evaluating the right-hand side (RHS) $f$. Let us therefore assume that all other operations are instant (i.e. without computational cost). If ... |
`I am working on a problem found here " http://www.caesarsystems.co.uk/NAFEMS_benchmarks/le10.html" ..I am really confused about the boundary conditions and tried my level best to compute it but result is totally different
here is my bcs`
class Left(SubDomain): def inside(self, x, on_boundary):
return (between (x[1... |
I'm trying to use periodic boundary conditions within a Raviart-Thomas finite element space in Fenics (dolfin 1.2.0) in a Ubuntu 12.04 (amd64) machine (with python 2.7). If other FE space is used, everything works fine, but if a Raviart-Thomas is considered, python crashes (due to libdolfin errors). In what follows, it... |
I am just wondering where the term Umbrella Sampling came from. Is there another meaning of literal "umbrella" in physics or mathematics?
|
I am trying to optimize some force-field parameters in a molecular framework so that the result of simulation comes as close as it can to the experimental structure.
In the past, I have written a genetic algorithm where I essentially randomly sample the parameter space, select the combination that works best, create se... |
I am confused most of the time with the application of boundary conditions in Fenics. Suppose I have an xml mesh for a rectangular beam and want to apply Dirichlet BC ($u =0$) on the left side of the beam in my mesh file. Can anyone tell me how can I achieve this?
I know another way of doing it by defining subdomains l... |
Is there a code for the equation
$$
\frac{\partial^2u}{\partial x^2}+\frac{\partial^2u}{\partial y^2} = \sin(u)
$$
or for the sine gordon equation in two dimensions because I want to change some boundary values to see the results?
|
I'm solving the Helmholtz equation using PETSc. I found with the PETSc configure option --download-f-blas-lapack my program runs twice as fast over running it with MKL. Is this a common trend or are there other factors at play? I'm using gcc and Open MPI with PETSc.
|
My program (in Python, using FEniCS):
mesh=UnitSquareMesh(16,16)
U_h = VectorFunctionSpace(mesh, "Lagrange", 1)
B = VectorFunctionSpace(mesh, "Bubble", degree=3,dim=2)
Mini_h = U_h + B
Boundary definition (for example, u0_boundary and u1_boundary are part of square, respectively):
w0 = Constant("0.0")
bc0 = DirichletB... |
I generated a mesh file in gambit and wanted to convert it to xml format. I tried the code below, but there is no output.
from dolfin import *
from dolfin_utils import meshconvert
dolfin-convert cylinder6.msh out.xml
can anyone tell me how to convert using dolfin??
|
I'm looking for sparse SPD matrices with right hand side? There is UF collection of sparse matrices, however, I'm not sure how do I search of the matrices of these kind efficiently (I'm doing a naive search which hasn't given me any results so far and it takes arbitrary long for some of the matrices).
|
I plans to use CSDP to solve the following semi-definite problem:
$$\min_{B, \beta}\operatorname{trace}(CB) \\
\text{s.t.} \ \operatorname{trace}(AB)=1 \\
\beta\geqslant 0 \\
\begin{bmatrix}
1 & \beta^{T}\\
\beta& B
\end{bmatrix}\succeq 0$$
where $A$, $B$, $C$ are $M\times M$ matrices,and $\beta$ is an $M$-dimensiona... |
I need to solve the following equation in FEniCS:
$$
\boldsymbol{\nabla} \cdot \begin{pmatrix}
f(y)\frac{\partial u}{\partial x} - g(x,y)\frac{\partial u}{\partial y} \\
- g(x,y)\frac{\partial u}{\partial x}+f(x)\frac{\partial u}{\partial y}
\end{pmatrix}=0.
$$
As far as I understand, the weak form will look like:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.