# Tag Info

5

I think the question is just too subjective to answer. In the end, there are excellent C++ libraries for nearly everything that has to do with the solution of PDEs, whereas they are largely missing in the Julia environment. Examples that come to mind are PETSc/Trilinos for linear algebra, deal.II/libmesh/FEniCS for discretizations, etc. You will have to ...

4

You can get a lot of help from http://www.cfd-online.com/. It's a good forum with a lot of active members working on OpenFoam.

4

The White-Christoph formula can be used to estimate the skin-friction coefficient as: $$C_f\approx\frac{0.455}{\ln^2(0.06Re_x)}$$ From this correlation, one can relate $C_f$ to $y^+/y_1$. Assuming that $x=1$, the following estimate is given for the initial spacing $y_1$ off the wall as: $$y_1=\frac{y^+}{Re}\left(\frac{0.2275}{\ln^2(0.06Re_x)}\right)^{-\... 4 In your problem description, note that 80\text{mm} \neq 0.008 \text{m}. That said, every quantity in a computer program is just a number. It's up to you to interpret it. So of course you can run a simulation where the domain has an edge length of 80 or 0.08 -- they refer to the same domain, after all. But depending on what you use as your base unit, you ... 4 The whole point of the OpenFOAM (OF hereinafter) libraries is exactly what you are inquiring for: PDE mimicking programming for CFD using the FV framework. In order to do what you are asking, you should have a decent foundation in C++ (not necessarily an expert...), of course in FVM and CFD in general. The first step in order to program using the OF ... 4 When dealing with conservation laws like your case, you can often make use of the divergence theorem (as you did). You can then express the fact that the total mass within your integration region is preserved by the following surface integral:$$\oint_{\partial \Omega} k \nabla T \cdot \mathbf{n} ~\partial S = 0 Now, as it stands, it is irrelevant which ...

3

I think OpenFOAM is pretty well suited for these problems; however, the best place to send your questions are to the CFD forum where much of the OPF community resides. You might also find some more guidance here. I recommend starting with something simple, like this example, to learn how to program your PDE. Lastly, I would comment that there is no, ...

3

Using a hash map adds a log(n) complexity to all accesses (then traversing the whole mesh will cost n log(n) in general), so clearly it is not the best solution. Now your question is how you can efficiently store and traverse adjacency information, i.e. for each cell the list of adjacent cells. First thing you can do for mapping a cell to its list of ...

3

I haven't used FiPy but only OpenFOAM, but I think some points on both homepages suggest it strongly depends on what you want to simulate. OpenFOAM already has some solvers imlemented (mostly CFD, since your profile states computational plasma physics the mhdFoam solver may be what you want or at least serve as basis, here's its user group), but can be ...

3

"pimple" is a good solver to work with, as it handles transient cases with RAS or LES turbulence. To change turbulence models, you'll need to specify this in your "turbulenceProperties" file by changing "simulationType" from "RASModel;" to "LESModel;" and providing an appropriate "lesProperties"file. I'd suggest checking out the channel395 tutorial in ...

3

You can do a simulation using the MRF (moving/multiple reference frame) approach. For this you need to create a cylindrical cell set that is aligned with the axis of rotation. There are some cases in the OpenFOAM tutorials that make use of this approach. You can also consult e.g. the Fluent Manual for some theory behind MRF. With MRF there is no actual mesh ...

3

Straight from Henry's finger tips: a comment which goes in the general direction of the OP's question. As Wolfgang pointed out, OpenFOAM predates many developments we're used to, including the STL and all later developments. Now, the OpenFOAM devs face the question of whether to stick with their implementations and strive for consistency; or to refactor ...

3

In the light of more recent information: OpenFOAM follows the C++11 standard without any exception at the time of writing. Therefore, you can use any C++ containers of this standard within OpenFOAM. OpenFOAM, at least .com version, has been updated very long time ago to entirely align the ISO/IEC 14882:2011 (i.e. C++11) standard. The main reason why the more ...

3

From the discussions and the paper, OpenFOAM seems to have implemented a measure of skewness. This answer is not an explanation why the different definitions of skewness might be equivalent, I am just going to justify why this is a measure of skewness. Consider following two elements -for sake of simplicity- Blue arrow is the outward surface normal fAreas[...

2

As it was discussed in the comments, the fluid density is most likely the culprit. If you are using an incompressible solver, such as icoFoam, simpleFoam or pimpleFoam, then no density is used. If you take a look at the source code of the said solvers, you will find no reference to any density. Also, in the case set-up, the pressure field will have the ...

2

As of today, there is no officially released functionality in OpenFOAM versions that converts VTK data to OpenFOAM grid data. Yet, a heuristically written python script was provided for such purposes: herein.

2

As far as I know, there is non such thing. But what you aim for should be fairly straight forward to implement, as long as you happen to have some experience with C++. Locate the circleSet in the OpenFOAM source directory. Make a local copy of it and rename it to something like faceSetSet. Read the name of the faceSet you'd like to sample on. Read the ...

2

OpenFOAM doesn't have the degree of prescribed mesh motion you are looking for. It has 6 DOF, but thats not sufficient. What you need is a CFD tool which is: A) 3D B) Unsteady C) Has strong mesh motion capability D) has control surface capabilities (can read meshes that define ailerons and other control surfaces, move them (the surface mesh) in ...

2

Units on the brackets follow the figure: Accordingly, [0 1 -1 0 0 0 0] = m/s

2

I suggest to start form this page, where you can find different project related to OpenFoam that use GPU. Keep in mind that OpenFoam was born with the intent to resolve practical case in applied problems, think its typical user as an engineer. In this kind of program is normal to develop a layer that hide the implementation, so the user principal work is to ...

2

I'm assuming you are starting with a list of cell definitions, say, as a list of vertices defining the cell and a "type" defining the topology of each cell. As part of the topology definition for each cell, you can easily get the faces for that cell defined, say, as a list of vertices. The first step in creating the CellAdjacentsMap that you need is to ...

2

While the OpenFOAM Forum is the proper place to ask, I will give it a shot. Write control can be set to follow only one rule: either write every time step, or write every 100 ms. There is no way around this, however, you can work your around with a little help from a friendly functionObject. Set up your case to write every time step to disk Use the ...

2

The expression with $g=1/2$ is second order if and only if f is the midpoint of P and N.The expression with $g\in[0,1]$ is second order if f is on PN and$fN/Pf=g$. If f is anywhere else you need to have more information. I have the impression you need to find better textbooks.

2

The fundamental difference between OpenFOAM and FreeFEM/FEniCs is the underlying approach in discretizing PDEs. OpenFOAM uses a finite volume method whereas FreeFEM and FEniCs employ the finite element method. Historically, finite volume methods were chosen for stability, but finite element-based CFD is what most research groups focus on (based solely on ...

2

Normal direction depends on the cell that you are writing equation for. the word outward is relative to the cell under study. In order to write equation for each of cells, i.e. $\Sigma \nabla T.n S_f=0$, stick to this : $\nabla T_{face}=\frac{T_c-T_i}{r_c-r_i}$ and assume $n$ as outward pointing normal vector for that face. I think your problem is that you ...

2

An extended answer. For more arbitrary meshes you have to consider that generally CFD/FEM solvers rely on generic data-structures with element and side lists: Element list Side list Consider the following pictures, which is the standard case for simple Cartesian meshes. Since there is a single plus and a single minus side on each face, the definition is ...

1

Not strictly no. They will reconstruct only linear functions on simple meshes exactly. You can get a better approximation (for non stretched meshes) using weighted least squares gradient reconstruction, but that still wont be exactly second order accurate. You can find more information on the gradient reconstruction techniques and their pitfalls here: https:...

1

Did you try to merge the three STLs to create one, closed STL. OpenFOAM brings with it a toolsurfaceAdd to join STLs. Apart from the problems you encountered in the feature extraction step, how do you think, the cell removal stage of snappy would cope with a non-closed surface? Answer to first comment: Join the STLs as separate solids. So, that you have ...

1

This is specified in the blockMeshDict. So it is a property of the patch itself. For pitzDailyMapped we have the following in the blockMeshDict. inlet { type mappedPatch; offset ( 0.0495 0 0 ); ... } So the sampling plane is located 0.0495 downstream of the inlet in the x direction.

1

OpenFoam will definitely satisfy your needs. Though you may feel some restrictions of solvers,still it mostly resolves all the domains. Also Open Source platform has its advantage of large user-base and support by community. You can always give a try.

Only top voted, non community-wiki answers of a minimum length are eligible