Simhydraulics: Pressure distribution over the entire circuit
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
Hello,
How do I plot the distribution of pressure, or any parameter, over a section of the circuitry at an instant in time? For example, I would like to know the pressure distribution on the exhaust circuitry of a double acting cylinder 10 milliseconds after the piston has reached the end of its stroke. Many thanks,
Paraic
채택된 답변
Sebastian Castro
2015년 10월 12일
편집: Sebastian Castro
2015년 10월 12일
If you know the exact time range you want, you can tell Simulink to log data only in that range. For example, suppose you already know the piston hits its limits at 9.99 seconds, so you want to log data from times 10 to 11 seconds. To do this, you can
- Go to Model Configuration Parameters (Ctrl+E) > Data Import/Export Pane
- Set the "Output options" to "Produce specified output only" ( doc link )
- Set the "Output times" to your time vector to, e.g., 10:0.001:11
If you want this to be "smarter", you can
- Place a motion sensor on the cylinder and measure its position. Put this through a 10 ms Transport Delay block since you want to start logging 10 ms AFTER the event.
- When the output of that block is greater than the max piston displacement, have Simulink output "true" and then feed that into an Enabled Subsystem.
- Inside the Enabled Subsystem block, pass in the measured pressure value into, e.g., a To Workspace block.
Since the To Workspace block will be inside a subsystem that runs only when its control signal is true, you will essentially log data only after the piston hits its maximum displacement.
Now, if you want additional logic that STOPS logging after some time, you'd have to implement that as well...
- Sebastian
댓글 수: 7
Thank you.
The question I am trying to ask is if I can generate one plot of the entire exhaust circuit pressure distribution at a given time. The piston example is good: the piston reaches max stroke at 20.7 seconds. Downstream of the double acting cylinder I have Segmented Pipelines, Elbows, Sudden Area Change, before reaching a 4 way-3 position directional control valve. If, say, each Segmented Pipeline is 5m in length with 10 segments in each is it possible to capture the pressure in each segment, elbow and sudden area change at time 20.71 seconds in a single plot?
Many thanks,
Paraic
Oh, I see! I've personally done this for Segmented Pipeline blocks where I extract the data from each segment and animate the pressure distribution over time -- so yes, it's possible.
Logging data for all the blocks in the model will give you access to all the pressure values; however, you have to parse through the data using the block name and hierarchy.
For example, if your data is logged in a variable named simlog:
pipe = simlog.Segmented_Pipeline;
t = pipe.ch_1.pressure.series.time;
p1 = pipe.ch_1.pressure.series.values;
If you will be varying the number of segments, you could try something as follows:
for i = 1:numSegments
p(:,i) = eval(['pipe.ch_' num2str(i) '.pressure.series.values']);
end
... And similarly for all other blocks in your model you care about.
As far getting the right time goes, you could do any of the following:
- Use the output options I mentioned in my original post, and force data to be logged at your known time of 20.71. This requires you to know the time beforehand, but it's an easy solution if you do.
- Take whatever data values come out and interpolate them in MATLAB
- Set up logic on the cylinder's measured position, as I also mentioned in the first post. This will force Simulink to take additional time steps around the event you are looking for, thus increasing the likelihood that you'll get data right around the time without you having to know it beforehand. Here's a screenshot:

- Sebastian
Thank you very much. Much appreciated.
The system I am trying to model physically operates on the seabed, at water depths ranging from say 700m to 1500m. At the moment I have the response I would expect at surface in terms of pressure waves, propagation etc when the piston reaches the end of its stroke. Do you know how I could simulate a back pressure on the exhaust line which could mimic hydrostatic pressure at depth? The physical system is designed without check-valves from "T" port on the directional valve, and fluid discharges to sea. I have tried to model a check valve between T port and Hydraulic Reference, but the simulation does not converge possibly due to dry spots in the system architecture (downstream of the check valve) after the fluid pressure drops below the cracking pressure of the spring in the check valve.
Many thanks, Paraic
Does it work if you add a Constant Hydraulic Pressure Source in reverse before the reference block, whose pressure value is rho*g*h, where h is the depth?
Also, if you go the Check Valve route, you could get around the dry node by making sure you place a Constant Volume Hydraulic Chamber block at the problematic nodes. This additional fluid compressibility will make your model more realistic AND more numerically stable.
- Sebastian
Yes, the Constant Hydraulic Pressure Source works. Thank you very much. I had problems with convergence using the ode15s solver until I switched to ode23t. Any thoughts on this? Does this point towards a flaw in my model, or parameters?
Also, could you briefly (in layman's terms) explain the role of the "Flow Discharge Co-efficient" in the directional valve? I'm no wiser having read the description in the documentation.
Many thanks,
Paraic
I would say that's a pretty strong indicator of a design flaw. I'd watch out for other dry nodes to see if that's the problem. Basically, look for any junctions in the model that do not have a fluid volume next to them. Fluid volume comes from volume chambers and cylinders.
The flow discharge coefficient is basically an empirical "fudge-factor" explaining the difference between the actual orifice and an ideal one. I like the Wikipedia explanation of it:
https://en.wikipedia.org/wiki/Discharge_coefficient
If you transpose the equation to solve for the pressure drop, you basically see that the smaller the discharge coefficient, the bigger the pressure drop across the orifice -- or, in other words, the less ideal the orifice is.
A discharge coefficient of 1 would be an ideal orifice, and 0 would be a solid wall inside your pipe :)
In fact, it wasn't an issue with convergence. I was logging all block simulation statistics and had not enough RAM so results were never displayed nor was I able to access logged data. By logging only the blocks of interest I was able to run with solver ode15s without issue. I believe that was the problem anyway.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
