Interpretation of fictitious forces arising from convection in fluid flow in a cylindrical coordinate system

P

Procyon

Guest
Procyon Asks: Interpretation of fictitious forces arising from convection in fluid flow in a cylindrical coordinate system
the time rate of change of linear momentum of a fluid with density $\rho$ and velocity vector $\mathbf{u}$ is given by the material derivative: $$\frac{\mathrm{D} \rho \mathbf{u}}{\mathrm{D}t} = \frac{\partial \rho \mathbf{u}}{\partial t} + \mathrm{grad}\left(\rho \mathbf{u}\right)\cdot\mathbf{u}$$ The term $\mathrm{grad}\left(\rho \mathbf{u}\right)\cdot\mathbf{u}$ (fictitious forces/change of linear momentum due to convection) can be written as: $$\mathrm{grad}\left(\rho \mathbf{u}\right)\cdot\mathbf{u} = \left[ \frac{\partial \rho u^j \mathbf{g}_j}{\partial \Theta^i} \otimes \mathbf{g}^i \right] \cdot \left[ u^k \mathbf{g}_k \right] = \frac{\partial \rho u^j \mathbf{g}_j}{\partial \Theta^i} \left[\mathbf{g}^i \cdot u^k \mathbf{g}_k \right] = \left[ \frac{\partial \rho u^j }{\partial \Theta^i} \mathbf{g}_j + \rho u^j \frac{\partial \mathbf{g}_j }{\partial \Theta^i} \right] u^i = u^i \frac{\partial \rho u^j }{\partial \Theta^i} \mathbf{g}_j + \rho u^i u^j \frac{\partial \mathbf{g}_j }{\partial \Theta^i}$$ (Using the notation in Itskov: Tensor Algebra and Tensor Analysis for Engineers. $u^i$ is a contravariant vector component, $\mathbf{g}_i$ is a covariant basis vector, $\mathbf{g}^i$ is a contravariant basis vector and $\Theta^i$ are the parameters (?) defining the current location in the coordinate system (for example radius, angle and axial position in a cylindrical coordinate system))

The interpretation of the term $$u^i \frac{\partial \rho u^j }{\partial \Theta^i} \mathbf{g}_j$$ is easy: It is the fictitious force/change of momentum in the $j$ direction that arises due to the fluid having a non-zero flow velocity in direction $i$ and having a non-zero gradient of the $j$ momentum component in that same direction (direction $i$). For example: $i$ is the radial direction and $j$ is the circumferential direction. The fluid has a positive radial velocity component ($u^r>0$) and the circumferential momentum $\rho u^\varphi$ is smaller at a smaller radius and is larger at a larger radius than the current radius, thus $$\frac{\partial \rho u^\varphi }{\partial \Theta^r} > 0.$$ Then cirumferential momentum is transported to a larger radius.

Now my question: How can I interpret the term $$\rho u^i u^j \frac{\partial \mathbf{g}_j }{\partial \Theta^i} ?$$ How does a curved coordinate line lead to a momentum transport?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
 
/forums/whats-new/news-feed

Unreplied Posts

Navigation host is not showing in Navigation graph

Deep Sheth Asks: Navigation host is not showing in Navigation graph
main activity (called news activity)

Code:
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.NewsActivity">

    <FrameLayout
        android:id="@+id/flFragment"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <fragment
            android:id="@+id/newsNavHostFragment"
            android:name="androidx.navigation.fragment.NavHostFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:defaultNavHost = "true"
            app:NavGraph="@navigation/nav_graph"/>


    </FrameLayout>

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottomNavigationView"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

and mine nav_graph.xml code

Code:
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/news_nav_graph">
</navigation>

i have tried to restart and cache android studio but it didnt work. and also updated navigation dependencies to latest version..

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Cell Loses Focus When Excel VBA installed Button Clicked

kds14589 Asks: Cell Loses Focus When Excel VBA installed Button Clicked
I have a sub-form that focuses its answer on the active cell that was chosen. BUT, once I click on the cell/button to load/show this sub-form, my choice of the ‘active cell’ changes to the button cell and my sub-form rejects the chosen cell. I don’t have this problem if I use an ActiveX button but I’ trying to avoid them on this project. Any recommendations?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Error with subscribe or inserting data between ionic and php/mysql

fernando gonzalez Asks: Error with subscribe or inserting data between ionic and php/mysql
In the file "cargar-obra.page.ts" I have this function:

Code:
btnClickAgregarObra(){
  const datosObra = {
      num_obra: this.num_obra,
      nombre_obra: this.nombre_obra,
      dir_obra: this.dir_obra,
      muni_obra: this.muni_obra,
      costo_obra: this.costo_obra,
      fecha_ini_obra: this.fecha_ini_obra,
    }
  this.configService.cargarObra(datosObra).subscribe(res=>console.log(res));

that last line calls this code on "config.service.ts":

Code:
public cargarObra(obraData){
    console.log(obraData);
    return this.http.post('http://localhost/obras.php',obraData,{headers:{'Content-Type':'application/json'}})
  }

About that las code, I put the "console.log(obraData)" to see if the json brings the data correctly, and it does.

And the code above calls the las file "obras.php":

Code:
$body = file_get_contents("php://input");
$body2 = json_decode($body, true);

$num_obra = $body2['num_obra'];  
$nombre_obra = $body2['nombre_obra'];
$dir_obra = $body2['dir_obra'];  
$muni_obra = $body2['muni_obra']; 
$costo_obra = $body2['costo_obra']; 
$fecha_ini_obra = $body2['fecha_ini_obra']; 
$inspector_asignado = $body2['inspector_asignado']; 

$sql = "INSERT INTO `obra`(`idobra`, `idusuario`, `descripcion`, `direccion`, `localidad`, `fechainicio`, `costo`) VALUES ($num_obra, $inspector_asignado,'$nombre_obra','$dir_obra','$muni_obra','$fecha_ini_obra', $costo_obra)";

$q = mysqli_query($conn, $sql);
die();

What could be happening? Thanks to all help.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Can I make a VR game with python?

Hextav Asks: Can I make a VR game with python?
I know python isn't a viable option for VR game development, but I hope there's a way to create a 3D game in it.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Memory leak when creating matplotlib.plots in loops

Husker Asks: Memory leak when creating matplotlib.plots in loops
I know it was discussed not only once. Unfortunately, I do not get further.

first the basic: I am trying to loop through OHLC data and create charts. Unfortunately the memory keeps running full.

Apparently it has something to do with the size of the chart.

Code:
plt.ioff()
fig = plt.figure(figsize=(50, 25))

for line in ohlc_data:

   # Make magic with the data
   # ...

   df = x.get_ohlc_data()
   ohlc_area = plt.subplot2grid((6, 3), (0, 0), colspan=3, rowspan=4)
   ohlc_area.plot(df[['Date']], df[['close']], 'k-', markevery=markers_on, marker='D',
                                                       label='close')
   plt.grid(axis='x', color='0.95')
   plt.grid(axis='y', color='0.95')
   plt.savefig("Diagramme/" + str(x.id) + "_" + x.state + ".png")

   # Try to clean up everything
   fig.clf()
   plt.cla()
   plt.clf()
   plt.close('all')
   gc.collect()

Up to this point it works. Unfortunately fig.clf() also resets the size of the diagram. If I try to resize the diagram within the loop, there is a memory leak and I don't understand why.

Code:
plt.ioff()
fig = plt.figure(figsize=(50, 25))

for line in ohlc_data:

   # Make magic with the data
   # ...

   #plt.figure(figsize=(50, 25))
   plt.rcParams["figure.figsize"] = (50, 25)
   #fig = plt.figure(figsize=(50, 25))

   df = x.get_ohlc_data()
   ohlc_area = plt.subplot2grid((6, 3), (0, 0), colspan=3, rowspan=4)
   ohlc_area.plot(df[['Date']], df[['close']], 'k-', markevery=markers_on, marker='D',
                                                       label='close')
   plt.grid(axis='x', color='0.95')
   plt.grid(axis='y', color='0.95')
   plt.savefig("Diagramme/" + str(x.id) + "_" + x.state + ".png")

   # Try to clean up everything
   fig.clf()
   plt.cla()
   plt.clf()
   plt.close('all')
   gc.collect()

I tried at the beginning of the loop with:

Code:
   #plt.figure(figsize=(50, 25))
   plt.rcParams["figure.figsize"] = (50, 25)
   #fig = plt.figure(figsize=(50, 25))

Unfortunately it does not work, can someone tell me how I can prevent the memory increase or how this problem comes about?

Thanks in advance

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Latest posts

Top