Von Neumann Equation Density Matrix Implementation

I’m trying to implement the von Neumann Equation for a given 4×4 density Matrix with a time dependent Hamiltonian Hp[t_] in Mathematica but I get stuck.

Format[y[a__]] := Subscript[y, a] rho[t_] := Array[x[##][t] &, {4, 4}]  sol = NDSolve[{I*rho'[t] == Hp[t].rho[t] - rho[t].Hp[t],     rho[0] == rhoIni}, {rho}, {t, 0, 10}] 

However I only get the output

{{rho -> rho}} 

So I guess something is structurally wrong with my code. I try to extract a solution by writing

rho[t_] = rho[t] /. sol 

But this doesn’t work as there is no solution anyways. Maybe you can help me

Thanks in advance

Change mesh density of Graphics3D object made of Triangles

I am new to mesh discretisation on Mathematica. I have a Graphics3D object made up of Triangles, that I would like to convert into a MeshRegion object using DiscretizeGraphics (see https://reference.wolfram.com/language/ref/DiscretizeGraphics.html).

In particular, I would like to control the mesh density. The above link tells me to use the MaxCellMeasure option, but it doesn’t seem to make any difference to my graphics!

Thus,

Table[DiscretizeGraphics[g,    MaxCellMeasure -> {"Area" -> m}], {m, {0.3, 0.01, 0.001}}] 

gives: enter image description here

As you can see, the meshing is unchanged. It doesn’t matter if I replace "Area" by "Volume" or "Length".

Can someone please tell me how to do this properly? Is this happening because my Graphics is already made up of triangles?

Make a density plot from a file where the data makes a shape with a hole in it

I have a .dat file and I want to make preferably a density (or surface) plot with it.

ListDensityPlot[f, ColorFunction -> "Rainbow", Axes -> False,   Background -> Black,   PlotLegends ->    Placed[BarLegend[Automatic, LegendMargins -> {{0, 0}, {10, 6}},      LegendMarkerSize -> {15, 300}, LegendLabel -> "F"], After] ,   AspectRatio -> 0.5,  PlotRange -> All] 

The data has the shape of a not perfectly round donut seen from above, so there’s a hole inside and the density and surface plot commands apply the color of the ColorFunction as if it’s 0 to the part in the center that corresponds to the hole. Is there a way that the part in the middle doesn’t get colored? Or can I assign specifically black to the values that are "0" (but where in reality there’s not data) and still use the Color Function?

SEO Keyword Density Issue

I have a website that has a keyword density of 8% and 4% for my keywords, but I only used the keyword once. The website doesn’t have a lot of actual text. Does this high keyword density hurt my site’s SEO even though I only used it once? I checked my keyword density using the SEO Review Tools density checker.

Simulating Gas Density and Pressure in a 2D World

I’m building a small spaceship simulation app that looks a lot like a game for an upcoming talk I’m giving where I use this sample app to teach the F# programming language.

This small app is something like FTL meets Oxygen Not Included where you have a top-down 2D grid of tiles (similar to an old RPG) where each tile has its own mixture of gasses – right now oxygen and carbon dioxide, but potentially others.

I’ve got a few things I’m trying to simulate:

  1. When new gasses are added to a tile by something like a vent or a life support system, that gas should expand to neighboring tiles if possible
  2. When a pressure changes (e.g. opening a door to another area of the ship or a hull breach), air should flow from the high pressure tile to the low pressure tile next to it.

Given this, and given that some gasses naturally sift to the top of others, I’m trying to figure out a small set of simple rules to govern this behavior.

Previously I had all gasses equalizing with their neighbors and no concept of pressure, but that made it very difficult to treat scenarios like hull ruptures, so I’m looking for something a bit more realistic without getting complex or hyper-accurate.

For example, given tile A with 15g oxygen and 6g CO2 and neighboring tile B of 3g oxygen and 1g CO2, some air should clearly flow from A to B. However, what flows? Is it the lightest gasses? The heaviest gasses? A random or representative sampling of gasses in A? Are there any relevant physics principles I should be aware of?

Note: I posted here instead of in physics because I don’t care extremely about nuanced accuracy, just something simple and believable

Is Adjust Density overpowered?

In the Explorers Guide to Wildemount there are two new arcane traditions: Graviturgy and Chronurgy. When you’re a Graviturgist at second level you get a magic feature called Adjust Density:

As an action, you can magically alter the weight of one object or creature you can see within 30 feet of you. The object or creature must be Large or smaller. The target’s weight is halved or doubled for up to 1 minute or until your concentration ends (as if you were concentrating on a spell).

While the weight of a creature is halved by this effect, the creature’s speed increases by 10 feet, it can jump twice as far as normal, and it has disadvantage on Strength checks and Strength saving throws. While the weight of a creature is doubled by this effect, the creature’s speed is reduced by 10 feet, and it has advantage on Strength checks and Strength saving throws. (EGW p.185)

I’m still pretty new to D&D and its rules and this made me confused. It’s a variant of the Enlarge/Reduce spell but it doesn’t require any spell slots or a saving throw to prevent it from affecting an unwilling target.

I’m new to being a DM and I’m not sure how OP something like this would be at second level. It could completely turn combats on their head if they use Adjust Density against an attacker whos attacks are based on strength.

I have two questions about this magic feature: Is this OP compared to other second level abilities and what can I do to prevent battles being turned on their head with this magic feature?

Interpolating a density plot

I am solving a complicated series of equations (involving FindRoot and PolyLog), and finally I get this plot enter image description here As you can see that between 1 and 10 on x-axis we see some data that is missing which I believe is because of numerical error in the computation. I don’t want to change anything in the calculation, is there any way to directly modify the plot as it is using interpolation or anything?

Where to put an “Activity Log” affordance on a page with fairly high info density?

Rule Builder page

Hey!

I’m designing a rule builder tool and trying to figure out where to put an “Activity Log” affordance – basically a place where the user can click and see a complete list of the edits that have been made to a specific rule, as well as their timestamps.

Right now it’s located in the “Queue” button (see screenshot), which, when clicked, displays a modal list of all the changes to the rule. However, this doesn’t seem right, because the rest of those CTA’s on the top right are reserved for explicit actions, not necessarily “locations” where the user will be taken.

So I’m wondering where else this affordance can be on the page where it makes sense in terms of UI best practices + principles? It doesn’t really matter if it opens up in a modal or another page.

Also, making it a third tab next to “Live” and “Draft” is not workable because, prior to making a draft, there’s a little “+ Create Draft” button next to the “Live” tab, which creates the Draft tab – so squeezing the Activity Log in there with that interaction happening is kinda tricky.

Anyways, I hope that all makes sense. Thanks for taking a look! Looking forward to your input 🙂