Creating a meandering river in an earth model

Hi everyone,
I am using Coreform Cubit 2022.4 for creating a 3D Earth model. I need to include a meandering channel (river) geometry in the upper part of my model. Can anyone please guide me through the process as I am new to cubit.
All the best,
Haleh

Hi @haleh,

Welcome to the forum! Is your geometry CAD based (ACIS) or is it a facet model? Facet modeling is not well supported in Cubit. If you have a CAD based model, I would probably do something like the following:

  1. Create points on the sphere
  2. Create a spline that fits the points
  3. Imprint the spherical surface with the spline.

Here is a set of commands that shows the basic process.

reset
sphere radius 10
create vertex 1.958 4.786 8.54 on surface 1 
create vertex 1.964 5.225 8.3 on surface 1 
create vertex 2.812 4.504 8.449 on surface 1 
create vertex 2.346 3.867 8.927 on surface 1 
create vertex 3.237 3.188 8.914 on surface 1 
create vertex 2.897 1.958 9.37 on surface 1 
create vertex 2.897 1.958 9.37 on surface 1 
create vertex 4 1.576 9.007 on surface 1 
create vertex 4 1.576 9.007 on surface 1 
create vertex 3.406 1.534 9.266 on surface 1 
create vertex 3.916 0.855 9.147 on surface 1 
create curve spline location vertex 11 9 10 6 5 4 3 1 2  
imprint surf 1 with curve 1
draw surf 1

The hard part is probably creating the vertices. Cubit does not currently support creating vertices in a spherical coordinate system. You will likely have to convert from latitude, longitude, radius to x, y, z coordinates. Cubit has python scripting functions and since version 2022.4 ships with numpy.

Let me know if you need more support in using python in Cubit.

Thanks,
Karl
image

Hi @karl
As a new member of the forum, I am impressed by the prompt response. Thanks indeed. Yes, I believe this is the correct approach I need to use. I will be doing the modeling in coreform, it would be a cubic earth model having several layerings where there is a meandering channel in the shallow part of the model. I still have a question:

to be able to define the meandering channel based on the spline approach as you suggested, how can I create an exactly similar curve parallel to the curve so that the other edge of the channel can be also created. How can I convert it to a 3D body? It is actually a river basin.

What if I have a csv file of the XYZ coordinates of the channel. Can I directly input it to my model for creating the channel?

I highly appreciate your time and consideration,
Bests,
Haleh

Hi Haleh,

It looks like you are creating the command in python. You can use any python operations that you want. If I understand your question correctly, you can just subtract to get the distance. For example,

x1_basin = 327510
x2_basin = 339680
y1_basin = 3033400
y2_basin = 3078100
z1_basin = 0
z2_basin = 3000

command = f" brick x {x2_basin - x1_basin} y {y2_basin - y1_basin} z {z2_basin - z1_basin}"
cubit.cmd(command)

I’ve been evangelizing the use of f-strings in python 3. I personally think they make string code much more readable.

Exact offsets of spline curves are difficult/impossible. You can approximate the offset using the Curve/Create/Offset capability. There is an example image below. Notice that the highlighted curves are the offsets. But the second half of the bottom curve is not continuous with the first half. Two curves were created from the offset command. Those are things you will have to watch out for.

We don’t currently have any Cubit training classes scheduled. I will ask about that. You can find almost all of the training materials on coreform.com/Coreform Cubit/Tutorials.

Karl