Pipe and Channels in modelica - fluid

I am trying to model a microchannel for fluid transport in openmodelica. The channel is non-circular though. I am not an expert in modelica, so if i may ask, from where can i start ? is the static and the dynamic pipes in the fluid library suitable for my purpose with some modifications ?
Here's the link of how the channel looks like:
https://www.dropbox.com/s/7opdu6dwnvqfsfc/pipe.png?dl=0
Any help would be appreciated.

I don't think there is a way to model non-circular pipes with the MSL, but probably you can break it down to a circular pipe that has the same properties as your non-circular one.
I am no expert on fluid dynamics, but if your current can be assumed to always be orthogonal to the cross section of the pipe (no chaotic behavior) you should be able to linearly map the cross section area to a diameter of a circular pipe and use that instead.

Related

Is it possible to model a pipe immersed in a fluid cavity using OpenModelica standard library?

I would like to model a pipe immersed in a fluid cavity to study the heat transfer between the two fluids. I modeled this by using two DynamicPipe connected to the same WallConstProp but I'm not sure it is a correct way to model it. My question is : is there a specific component available in the MSL to model such a configuration or should I look in other libraries ?
Best regards,
Maxime
There is no such component for the heat transfer of a pipe to a surrounding fluid in the Modelica Standard Library as far as I know. If you only need heat transfer orthogonal to the flow in the wall then it is a good assumption to model both fluids with a pipe connected via a heat transfer. You can create your own heat transfer model based e.g. on a Nusselt correlation in order to model the heat transfer to a surrounding fluid for the second pipe.
The MSL offers basic components to provide a common basis for all Modelica users and works as a starting point. Specific applications can be covered by specific commercial or open source libraries.

ANSYS Meshing Issue - How To Mesh Complicated Geometry (~80,000 Faces)?

I am attempting to mesh a complicated design (~80,000 faces) for a microchannel heat sink, as pictured, and I would appreciate some advice. I have tried a range of different mesh controls (especially face sizing and body sizing), mesh settings and element sizes, and all have failed to produce a working mesh. The most common errors are shown in the linked picture, in particular the one regarding "The following surfaces cannot be meshed with acceptable quality. Try using a different element size or virtual topology." However, I have already reduced the element size to 2x10^-6 m, which takes two days to resolve before failure.
Unfortunately I cannot alter the geometry significantly, as it is imported from generation in SolidWORKS as either a STEP or an x.t file. As such, any advice for how I can successfully mesh the geometry for CFD analysis in FLUENT would be greatly appreciated.
I can provide more details or the geometry file itself if required.
Thanks in advance.
Meshing Attempt
Probably your cad design is not clean at all. But it is impossible to notice from this image. If you don't have control over the geometry source it is trouble. Because you might ask somebody else about check and fix something. First check you can do with your model it's trying to reduce the number of elements until the minimum possible value. Then if the mesh runs properly you can relay in the surfaces of your cad model. After that, you can refine the mesh, but the refining process is something that you have to do following some error criteria. If you are also the designer why not try to simplify a bit the geometry if you consider it is really hard to mesh? Meshing properly is a hard task, you should go step-by-step until you reach some solution. Also, you must not allow the preprocessor mesh automatically, without giving some criteria. Probably the first thing you have to answer even before apply any mesh is, what is your Reynolds number? And what is the most valuable result in which you can base the goodness of your discretization?
Thank you for your suggestions. In the end I solved the issue by importing the original mesh generated by COMSOL into SpaceClaim, then employing both the "Smooth" and "Reduce Faces" tools in tandem to simplify the geometry, before finally using SolidWORKS to turn the smoothed mesh into a solid body. This body retained many of the same features as the original, but was much less complex, having two orders of magnitude fewer faces. In turn, this permitted both meshing and heat transfer analysis in FLUENT.

D3D12 Use backbuffer surface as unordered access view (UAV)

Im making a simple raytracer for a schoolproject were a compute shader is supposed to be used to shade a triangle or some other primitive.
For this I'd like to write to a backbuffer-surface directly in the compute shader, to then present the results imideatly. I know for certain that this is possible in DX11 though i can't seem to get it to work in DX12.
I couldn't gather that much information about this, but i found this gamedev thread discussing the exact same problem I try to figure out and they seem to come to the conclusion which was my go to workaround: writing to an intermediate texture and then sampling in a pipeline.
I can't fully accept that this would be impossible to achieve in dx12. Why would that feature be removed? Could it be that the queuing-systems removes some overhead that makes it unnecessary to have this feature?
Is there any way to achieve a raytracer without writing to a separate texture and then sampling in a pipeline or copy it onto the back-buffer? What are my best alternatives for achieving performance?
You will have to access the answer. They removed the capability to create an UAV the same way they removed the capability to use multisample surface in the swapchain.
The problem with authorizing UAV on the swapchain surface is that they would have to forfeit tracking of what is happening to it. DX12 rely on descriptor heaps that are 100% volatile at runtime for UAVs ( render targets are CPU side only and can be tracked ).
Microsoft need to track the swapchain surface status strongly in order to guarantee behavior with the desktop presentation and for that reason, they choose to deny the UAV binding.

Modelling Diffusion in Dymola/Modelica

I'm facing a problem with modelling diffusion in Dymola.
I want to have two seprate volumes (filled with air), which can be joined and thus exchange heat via diffusion.
My approach was using the Modelica.Fluid library and connect two ClosedVolumes with a Valve.
But as I found out, this library doesn't regard difussion.
What would be the best way to accomplish such a model?
This limitation is due to the use of stream connector in the Modelica.Fluid library.
One way to solve this is to develop a fluid connector which do not rely on stream connector but only on potential and flow variables. Unfortunately in this case you'll have to solve yourself numerical problems for solving flow reversal and zero-flow singularity.
One example is described in the paper "A physical solution for solving the zero-flow singularity in static thermal-hydraulics mixing models" presenting in the Modelica conference 2014. Basically, adding diffusion helps to solve zero-flow singularity and they use a regularized step function to solve flow reversal. Other regularization functions can be found in Modelica.Fluid.Utilities.
Hope this help,
Best regards.

Getting started with Finite Elements methods

There is a cubic block of fractured rock; the question is:
how to simulate fluid flow from top-side to down-side or left-side to right-side?
Is FEA (FEM,...) the only practical solution?
If so for the question above in its simplest conditions, that is, flow can happen only through fractures; no interaction between matrix and the fluid; etc etc how to have a quick simulation with FEA?
Is this practical someone with professionality in FEA could do this in a few minutes? Suppose there is already a suitable mesh generated.
If not what would you recommend to get started rapidly to be able to solve such simple cases?
Is there anybody having experience with similar problem (flow modeling); if so what did you use and how did you fulfilled the job?
Note that we are aware of availability of many FEM packages e.g., FEniCS, OpenFoam, ....
Your question refers to simulation of the fluid in the porous medium, e.g. the rock.
I highly recommend using LBM instead of FEM-based methods. LBM simulates the flow in porous media by nature. Phys Review E contains publications about that approach. What is even more attractive, LBM can be also easily parallelized on GPU.
There are a number of numerical techniques that could be used to solve this problem, finite elements being probably the most common. If you have a mesh of the fluid flow domain already (presumably the voids/cracks in the rock) it would be very straightforward to set up and run the flow model with pretty much any CFD package (finite element based or not) and most people with any exposure to FEA should be able to do it. I am assuming that you want to understand the fluid flow within the rock in some detail, rather than just evaluate the effects of the rock on the flow in some larger flow domain. In the latter case, there are other approaches which might be more computationally efficient.
You could use the one-dimensional form of Darcy's Law.