Math & Numbers
Рассчитывает расход через диафрагму по ISO 5167 (несжимаемая среда, Бернулли + коэффициент расхода C_d): A=π·d²/4, объёмный расход Q=C_d·A·√(2·ΔP/ρ), массовый расход ṁ=C_d·A·√(2·ρ·ΔP), скорость в отверстии v=C_d·√(2·ΔP/ρ). Если указан диаметр трубы D, возвращается отношение β=d/D. ΔP≥0, ρ>0, C_d по умолчанию 0,61 (диафрагма с острой кромкой). Диаметр в м/см/мм, давление в Па/кПа/бар/атм/psi, плотность в кг/м³/г/см³; объёмный расход выдаётся в м³/с, л/с, л/мин и м³/ч.
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'http://127.0.0.1:3003/ru/api/tools/orifice-flow-calculator' \
-H 'Content-Type: application/json' \
-d '{"dischargeCoefficient":0.61,"orificeDiameter":0.05,"orificeDiameterUnit":"m","pipeDiameter":0.1,"pipeDiameterUnit":"m","pressureDiff":10000,"pressureUnit":"Pa","density":1000,"densityUnit":"kg/m3","decimalPlaces":4}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST http://127.0.0.1:3003/ru/api/tools/orifice-flow-calculator| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| dischargeCoefficient | number | Да | Discharge coefficient C_d of the orifice (0 to 1). Typical sharp-edged thin-plate value ≈ 0.61. |
| orificeDiameter | number | Да | Orifice (throat) diameter d. Enter in the selected Orifice Diameter Unit. |
| orificeDiameterUnit | select | Нет | — |
| pipeDiameter | number | Нет | Upstream pipe inner diameter D. Optional — used only to compute the diameter ratio β=d/D. Enter in the selected Pipe Diameter Unit. |
| pipeDiameterUnit |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-orifice-flow-calculator": {
"name": "orifice-flow-calculator",
"description": "Рассчитывает расход через диафрагму по ISO 5167 (несжимаемая среда, Бернулли + коэффициент расхода C_d): A=π·d²/4, объёмный расход Q=C_d·A·√(2·ΔP/ρ), массовый расход ṁ=C_d·A·√(2·ρ·ΔP), скорость в отверстии v=C_d·√(2·ΔP/ρ). Если указан диаметр трубы D, возвращается отношение β=d/D. ΔP≥0, ρ>0, C_d по умолчанию 0,61 (диафрагма с острой кромкой). Диаметр в м/см/мм, давление в Па/кПа/бар/атм/psi, плотность в кг/м³/г/см³; объёмный расход выдаётся в м³/с, л/с, л/мин и м³/ч.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=orifice-flow-calculator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "orifice-flow-calculator",
"arguments": {
"dischargeCoefficient": 0.61,
"orificeDiameter": 0.05,
"orificeDiameterUnit": "m",
"pipeDiameter": 0.1,
"pipeDiameterUnit": "m",
"pressureDiff": 10000,
"pressureUnit": "Pa",
"density": 1000,
"densityUnit": "kg/m3",
"decimalPlaces": 4
}
}
}| select |
| Нет |
| — |
| pressureDiff | number | Да | Measured pressure differential ΔP across the orifice plate. Enter in the selected Pressure Unit. |
| pressureUnit | select | Нет | — |
| density | number | Да | Fluid density ρ. Enter in the selected Density Unit. |
| densityUnit | select | Нет | — |
| decimalPlaces | number | Нет | — |
JSON-результат
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Вопросы или проблемы? Свяжитесь с [email protected]