Hi everyone!
I have modeled a landslide in FLAC3D. I am trying to reproduce the stress state in a small portion (a box) of the landslide body, inside which a tunnel is located, in order to deepen the analysis on the consequences of landslide movements on the tunnel itself. Is it possible to do this either in FLAC3D or in 3DEC?
I have already tried exporting the stress state data on the outer surface of the said box in FLAC3D and applying it to faces along the boundaries of the same box in 3DEC using the command ‘block face apply’, but it seems that in this way the stress values are not maintained during cycling. So I am wondering if there is a better approach or command. Thanks!
Not sure if I understood correctly, but for these kind of problems the way to go is to impose velocity/displacement boundary conditions at the gridpoints, you’re basically doing something called ‘nested models’ or ‘sub-modelling’.
You could even make a table with a history of velocities/displacements and apply them at the desired gridpoints. This forces the boundaries of your small model to move exactly as dictated by the larger landslide simulation.
I’ve never done this myself, but theoretically is the way to go.
Best,
Hi Pietro,
I have recently transferred stresses from a big model to a smaller box using python. You can extend the code to do the same with gridpoint information.
Best,
Josef
import itasca as it
import numpy as np
it.command(‘python-reset-state false’)
new_model = ‘new_mesh.f3sav’
stress_model = ‘existing_model.f3sav’
save_name = ‘stress_transfer.f3sav’
zone_info =
get zone location from new model
it.command(“”"
model restore “{}”
“”".format(new_model))
for zp in it.zone.list():
z_id = zp.id()
x, y, z = zp.pos()
temp = {
‘id’ : z_id,
‘x’ : x,
‘y’ : y,
‘z’ : z,
}
zone_info.append(temp)
get stresses and deformations from real model
it.command(“”"
model restore “{}”
“”".format(stress_model))
for ind, item in enumerate(zone_info):
loc = np.array([item[‘x’],item[‘y’],item[‘z’]])
zone = it.zone.near(loc)
zone_info[ind][‘stress’] = zone.stress()
set the stress state to the new model
it.command(“”"
model restore “{}”
“”".format(new_model))
for ind, item in enumerate(zone_info):
loc = np.array([item[‘x’],item[‘y’],item[‘z’]])
zone = it.zone.near(loc)
zone.set_stress(item[‘stress’])
it.command(“”"
model save “{}”
“”".format(save_name))
Hi everyone,
Thank you for the insights and the suggestions. I have been able to recreate the stress state in the nested model (the mentioned box) using the python console available in my version (9.00.172). I was trying to set the boundary condition (velocity) by also using python. I tried to use this command ‘set_vel()’, but of course it doesn’t worked as a boundary condition.
So my first question: is there a way to fix the values that I want to set so that they work as boundary condition? That would be very convenient since python runs very quickly compared to 3DEC standard commands.
Then I tried to work on FISH instead, and I used the following script:
fish define VelocitiesFromcsv
f = file.open(“velocity_matching.csv”, “read”, “text”)
n = 0
l = file.read(f,10000)
loop foreach line l
if n > 0 ;header skipped
tokens = string.split(line, “,”) ;velocity values and id extracted from .csv
id = int(tokens(1))
pnt = block.gp.find(id)
vx = float(tokens(5))
vy = float(tokens(6))
vz = float(tokens(7))
; Set velocity
block.gp.vel(pnt) = vector(vx, vy, vz)
; with this command I a hoping to fix the velocity after setting them with the previous command (block.gp.vel(pnt)
block.gp.bc.x(pnt) = 3
block.gp.bc.y(pnt) = 3
block.gp.bc.z(pnt) = 3
endif
n = n+1
endloop
file.close(f)
end
However, while this script allowed me to set the initial velocities, it did not allow me to maintain the velocities of all the surface gps while cycling (similar to the following, i.e., the ‘dot’ distribution).
Second question: I am probably using this command in the wrong way, so how should it be used?
I also tried using the standard 3DEC command:
block gridpoint apply velocity-x [vx] velocity-y [vy] velocity-z [vz] range id [id]
(block gridpoint apply velocity-x 8.377951534343945e-10 velocity-y -2.7312357946637412e-08 velocity-z -1.1320719581249503e-07 range id 173677)
However, this last operation is very time consuming, especially considering that I am trying to apply different velocities to more than hundreds of thousands of gps. Also, I have noticed that after applying the velocities as described and running a few cycles, some gps still move with unexpected velocities, as the applied velocity value appears not to remain fixed.
Third question: what could be the reason for this behavior?
In the picture you can see the “dot” distribution of velocities (blue ‘dots’ are the gps where velocity values seem to be maintained) I mentioned.
Thank you all in advance!
A couple of things here:
- Coupling between FLAC3D and 3DEC is now built in, so in theory you don’t need to do any of this. Although maybe you want to delete the FLAC3D part after initial equilibrium to speed things up. I’m not sure what happens in this case …
- Are you applying a different velocity to every gridpoint on the boundary? If they are all the same, then it is easy (just use a different range). Even if they are all different, what you are doing should work. Maybe try setting the vector of boundary conditions: block.gp.bc(pnt) = vector(3,3,3)
If you can’t figure it out, please send the model to 3decsupport@oneitasca.com