How to define a irregular velocity source?

Asked by Jingchi Yu

Hi, sir

I made a square mesh through the Gmsh, and then I want to load a irregular time variant source of velocity to the boundary.

(1)First, I have a question about basic knowledge: In the time variant source example of example08b.py, I found that a full sinusoidal load is not applied directly, but instead, it is necessary to first "# set initial values for first two time steps with source terms",and then set "# increment loop values "

Why do we need work like this?

(2)Second, If I need apply a irregular time variant source of velocity, like seismic velocity timing, how to input the velocity data?

Thank you very much!

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Ellery
Solved:
Last query:
Last reply:
Revision history for this message
novita tait (nortia22) said :
#1

Abstract. Streamline tracing on irregular grids requires reliable interpolation of velocity fields. ... field methods have built-in interpolation, but are often not defined on general grids such as ... in an area with no sink, source, or accumulation term.

Revision history for this message
Jingchi Yu (yujc-17) said :
#2

Actually, I mean that if we apply a velocity time variant source to the boundary of a column of serendipity quadrilateral elements, how to do that by input an array, like
[0.01,0.1
0.02, 0.3
0.03,0.5
0.04,0.4
0.05,0.2
0.06,-0.1]

Revision history for this message
Adam Ellery (aellery) said :
#3

Hi Jingchi,

I am not sure if I understand your question correctly.

If you would like to define the values at the outside nodes of your grid, then you can do so using something like:

x = domain.getX()[0]
xmin = inf(x)
xmax = sup(x)
y = f * whereZero( x - xmin)+ g * whereZero(x-xmax)

Where f and g are functions that determine the values of the nodes on the west and east boundary respectively.

- Adam

Revision history for this message
Jingchi Yu (yujc-17) said :
#4

Adam,

Thanks for your reply and kindness to help.

Actually, if f and g cant be defined by functions, cause they are irregular time variant source of value at nodes, how to solve that we should?

Cheers,
Yu

Revision history for this message
Jingchi Yu (yujc-17) said :
#5

Adam,

Thanks for your reply and kindness to help.

Actually, if f and g cant be defined by functions, cause they are irregular time variant source of value at nodes, how to solve that we should?

Cheers,
Yu

Revision history for this message
Best Adam Ellery (aellery) said :
#6

You can create a loop that loops over your array of values and, at each step, does a calculation like this:

z = z + [value at point (x0,y0)] * whereZero(x-x0) * whereZero(y-y0)

where
x = domain.getX()[0]
y = domain.getX()[1]

and z is the output Data object.

You can check that the output is correct using
print(x.toListOfTuples())
print(y.toListOfTuples())
print(z.toListOfTuples())

- Adam

Revision history for this message
novita tait (nortia22) said :
#7

Four different types of biomass micro size particles from different sources are ... has been used to define drag coefficient as a function of Reynolds number. ... influence on the migration<a href="https://espiort.club/">velocity</a> of irregular-shape particle in turbulent flow.

Revision history for this message
Jingchi Yu (yujc-17) said :
#8

Thanks Adam Ellery, that solved my question.