|
[Sponsors] |
March 5, 2024, 07:13 |
Adding a body force to the NSE in a solver
|
#1 |
Member
Divyaprakash
Join Date: Jun 2014
Posts: 74
Rep Power: 12 |
I need to do the following.
I have a force that needs to implemented at various locations in the computational domain. This force I am calculating through some other program. Let's say I write a text file which has the forces defined at all the locations corresponding to the mesh cell centers. Is it possible to read this file and add it to the discretized equations of let's say PisoFOAM solver as a body force? At every timestep? Please let me know if such a thing is possible in OpenFOAM. I would then venture further on how it could be done. Also please provide some guidance if tools exist to readily implement this into the solver. |
|
March 6, 2024, 04:54 |
|
#2 |
Senior Member
|
||
March 9, 2024, 05:02 |
|
#3 | |
Member
Divyaprakash
Join Date: Jun 2014
Posts: 74
Rep Power: 12 |
Quote:
This isn't exactly what I need but thanks anyway. I was looking to implement it directly inside the source code. |
||
March 10, 2024, 08:06 |
|
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 746
Rep Power: 14 |
Yes - just make sure that the data is stored in OpenFOAM format, read it in as a field and apply it as an extra source term in the momentum equation. The first step is probably going to be the hardest one for you.
|
|
Tags |
body force, pisofoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
attachmentPt for floating body at each time step for overInterDyMFoam solver | mahsankhan | OpenFOAM Running, Solving & CFD | 0 | January 24, 2022 12:13 |
interFOAM, how to define body force and force on interface | Prosper | OpenFOAM Pre-Processing | 3 | June 17, 2021 10:56 |
ActuatorDiskExplicitForce in OF2.1. Help | be_inspired | OpenFOAM Programming & Development | 10 | September 14, 2018 12:12 |
conjugateHeatFoam + interFoam | farhagim | OpenFOAM Programming & Development | 15 | July 19, 2016 08:55 |
Force on moving body | joechorn | Fluent UDF and Scheme Programming | 5 | April 2, 2015 12:25 |