|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Dec 2024
Posts: 11
Rep Power: 3 ![]() |
How can i make ramp function for inlet? File etc.
|
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 869
Rep Power: 19 ![]() |
Try something like uniformFixedValue, which allows a tabular input. If that's not what you are after, then you'll need to give us some more details on what you are trying to achieve ...
|
|
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Dec 2024
Posts: 11
Rep Power: 3 ![]() |
I want to create a speed value that varies with time.
For example; time = 0 sec -> U (10 0 10) time = 1 sec -> U ( 200 0 200 ) U speed will increase as a ramp function within 1 second. I'm drawing a graph as an example. [IMG] https://resimlink.com/XmHvws13D [/IMG] Last edited by kendinemühendis; December 27, 2024 at 17:01. Reason: images |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 869
Rep Power: 19 ![]() |
Try:
Code:
inlet {
type uniformFixedValue;
uniformValue table
(
(0 (10 0 10))
(1 (200 0 200))
);
}
|
|
|
|
|
|
|
|
|
#5 |
|
New Member
Ata
Join Date: Jun 2020
Posts: 3
Rep Power: 7 ![]() |
Alternatively, you can use a coded function within the U file:
Code:
inlet
{
type codedFixedValue;
value uniform (10 0 10);
redirectType myFunction; // This specifies a name for the coded boundary condition
code
#{
const scalar t = this->db().time().value(); // Current time
const scalar rampDuration = 1.0; // Duration for ramping (seconds)
const scalar amplitude = 190; // Amplitude of ramp function
const scalar uInitial = 10; // Velocity at t=0
scalar ramp = min(t / rampDuration, 1.0); // Gradual ramp
vector U_inlet = (uInitial + (ramp* amplitude)) * vector(1, 0, 1);
operator==(U_inlet); // Apply velocity
#};
}
|
|
|
|
|
|
|
|
|
#6 |
|
New Member
Join Date: Dec 2024
Posts: 11
Rep Power: 3 ![]() |
Thank you! This worked but in the U file "internalField uniform (485.79 0 176.81); " I am having problems with this part. When I write "internalField uniform (450 0 150);" the analysis is solved, but when I write (485.79 0 176.81) it is not solved. What do you think could be the reason? Thank you very much.
|
|
|
|
|
|
|
|
|
#7 | |
|
New Member
Join Date: Dec 2024
Posts: 11
Rep Power: 3 ![]() |
Thank you! I will try
![]() Quote:
|
||
|
|
|
||
![]() |
| Tags |
| function, openfoam, ramp |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
| compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |
| [blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |
| Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 07:59 |
| Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |