Adding velocity option to isosurfaces refinement strategy - #7257
Adding velocity option to isosurfaces refinement strategy#7257hyunseong96 wants to merge 1 commit into
Conversation
bangerth
left a comment
There was a problem hiding this comment.
The velocity is a vector, but you need a scalar to compare with. Would you mind renaming "Velocity" everywhere you mention it in this patch by "Norm of velocity" or norm_of_velocity, etc.?
Otherwise very close!
| "For now, only temperature and compositional fields are allowed as " | ||
| "field entries. The key words could be 'Temperature' or one of the names " | ||
| "For now, only temperature, velocity and compositional fields are allowed as " | ||
| "field entries. The key words could be 'Temperature', 'Velocity' or one of the names " | ||
| "of the compositional fields which are either specified by user or set up " | ||
| "as C\\_0, C\\_1, etc." |
There was a problem hiding this comment.
I think at the end of this paragraph, it would be useful to state that for velocity (or norm of velocity, see the comment above) the values you compare against are either given in meters per second or meters per year, depending on whether the "Use years instead of seconds" parameter is set.
There was a problem hiding this comment.
Ah yes. They need to be more specified. I will fix so!
|
/rebuild |
|
Tag me when you're done. Before you do so, please squash everything into one commit! |
9097246 to
dd359d3
Compare
|
@bangerth Thanks! Now commits are squashed and I added explanations for norm of velocity |
|
The isosurfaces_simple_box_2D_custom_fieldnames_fail test now fails. Can you investigate what is going wrong? |
| enum class PropertyType | ||
| { | ||
| Temperature, | ||
| Velocity, |
There was a problem hiding this comment.
I meant to also rename this to Norm_of_velocity.
| // The property name has not been found. This could be because the compositional field is not present. | ||
| // Abort and warn the user. | ||
| std::string key_list = "Temperature"; | ||
| std::string key_list = "Temperature, Norm of Velocity"; |
There was a problem hiding this comment.
Here and perhaps elsewhere, I think I would only capitalize the first letter. So
| std::string key_list = "Temperature, Norm of Velocity"; | |
| std::string key_list = "Temperature, Norm of velocity"; |
with corresponding changes where necessary.
|
@bangerth Yesss. I checked the prm file. 'isosurfaces_simple_box_2D_custom_fieldnames_fail' prm returns the error message about the available options. The test diff file shows: |
Hi, I create a PR to add velocity option to isosurface.
I added velocity where the selection of fields are needed.
And I realized that input has m/s unit for velocity, so I made a conversion of unit if a model uses year.
So the test prm file test whether isosurfaces work with a velocity criterion.

Vertical velocity (v) varies by left and right side of the model. left half has 8 m/yr, and right side has 2 m/yr. The rest of the parameters are isotropic.
By the isosurface criterion, refinement levels are 3 for the velocity between 5 and 10 m/yr and 1 for the velocity between 0 and 5 m/yr. I put x and y repetitions as 2.
The result expects nodes to be 2^(1+ isosurfaces velocity level)*(repetitions). The result file has 32 on left side and 8 on right side. Therefore, isosurface velocity option works well.