-
-
Notifications
You must be signed in to change notification settings - Fork 122
AxialGeoMultiscale Tutorial #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already quite clean, thank you for the careful work! I added a few comments, mostly on details.
I have not yet tried to run it.
partitioned-pipe-multiscale/fluid3d-openfoam/system/controlDict
Outdated
Show resolved
Hide resolved
partitioned-pipe-multiscale/fluid3d-openfoam/system/preciceDict
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments to get you started.
I want to look again into the Nutils code after you add some more comments, and I still need to run it. Since I assume you are still based on preCICE v2, please don't yet port it to v3.
readData | ||
( | ||
Velocity | ||
); | ||
|
||
writeData | ||
( | ||
Pressure | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In his recent thesis, @thesamriel developed some new boundary conditions that would be interesting to try out here. No need to do it now, unless we really have issues on the interface. But you may want to have a look: https://mediatum.ub.tum.de/node?id=1696254&change_language=en
<m2n:sockets from="Fluid1D" to="Fluid3D" exchange-directory=".." /> | ||
|
||
<coupling-scheme:serial-implicit> | ||
<time-window-size value="0.01" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to couple so often? How important is this choice?
I assume that OpenFOAM still adapts its time step, but still, it currently looks like this is a requirement.
|
||
<coupling-scheme:serial-implicit> | ||
<time-window-size value="0.01" /> | ||
<max-time value="20.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to run the case for so long to see clear results? For tutorials, I would prefer the case finishing in < 2 min runtime. I have not yet tried to run the case, though.
partitioned-pipe-multiscale/fluid1d-python/precice-Fluid1D-iterations.log
Outdated
Show resolved
Hide resolved
vertex_ids = interface.set_mesh_vertex(mesh_id, positions) | ||
precice_dt = interface.initialize() | ||
|
||
# problem definition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you write a few sentences on what exactly you are trying to solve here?
I have zero experience with nutils, so it could be useful if at least @IshaanDesai could also do a quick check. I think you have discussed it already.
ucons = diricons | ||
stringintegral = '(p - ' + str(numpy.rint(p_read)) + ')^2 dS' | ||
psqr = domain.boundary['right'].integral(stringintegral @ ns, degree=2) | ||
pcons = solver.optimize('p', psqr, droptol=1e-15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I barely understand what is going on here, but a tolerance of 1e-15
sounds too strict to me.
In the current configuration file, the logger is configured to show debug messages from the mapping: <log>
<sink
type="stream"
output="stdout"
filter="(%Severity% > debug) or (%Severity% >= debug and %Module% contains Mapping)"
enabled="false" />
</log> This might be useful later, but I am going to make the file consistent with all other tutorials. |
After porting the code to preCICE v3, the simulation runs but I don't seem to get any inlet in the 3D pipe. Suspecting that I messed up something in 6e622a9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To demonstrate that the mapping is what does the work, and not ParaView's interpolation, let's replace this picture with one showing the actual cell (face) values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add a schematic to show the two domains and their boundary conditions.
I could also imagine that something went wrong when porting the old Nutils script to the new Nutils version. Find the old one in aa8fe2f |
The goal of this PR is to have a tutorial case for the newly developed AxialGeoMultiscale mapping feature.
The tutorial consists of a 1D and a 3D pipe that exchange velocity and pressure values.
This PR is still a draft, because the tutorial case is not yet satisfactory - TO DO: